docs: public static AbstractAuditLogger newInstance(Type type, KieSession ksession, Map<String, Object> properties) {
          AbstractAuditLogger logger = null;
          switch (type) {
              case JPA:
                  logger = new JPAWorkingMemoryDbLogger(ksession);
                  break;
              case JMS:
                  boolean transacted = true;
                  if (properties.containsKey("jbpm.audit.jms.transacted")) {
                      transacted = (Boolean) properties.get("jbpm.audit.jms.transacted");
                  }
                  
                  logger = new AsyncAuditLogProducer(ksession, transacted);
                  // set connection factory and queue if given as property
                  if (properties.containsKey("jbpm.audit.jms.connection.factory")) {
                      ConnectionFactory connFactory = (ConnectionFactory) properties.get("jbpm.audit.jms.connection.factory"); 
                      ((AsyncAuditLogProducer) logger).setConnectionFactory(connFactory);
                  }                
                  if (properties.containsKey("jbpm.audit.jms.queue")) {
                      Queue queue = (Queue) properties.get("jbpm.audit.jms.queue"); 
                      ((AsyncAuditLogProducer) logger).setQueue(queue);
                  }
                  try {
                      // look up connection factory and queue if given as property
                      if (properties.containsKey("jbpm.audit.jms.connection.factory.jndi")) {
                          ConnectionFactory connFactory = (ConnectionFactory) InitialContext.doLookup(
                                  (String)properties.get(properties.get("jbpm.audit.jms.connection.factory.jndi"))); 
                          ((AsyncAuditLogProducer) logger).setConnectionFactory(connFactory);
                      }                
                      if (properties.containsKey("jbpm.audit.jms.queue.jndi")) {
                          Queue queue = (Queue) InitialContext.doLookup((String)properties.get("jbpm.audit.jms.queue.jndi")); 
                          ((AsyncAuditLogProducer) logger).setQueue(queue);
                      }
                  } catch (NamingException e) {
                      throw new RuntimeException("Error when looking up ConnectionFactory/Queue", e);
                  }
                  break;
              default:
                  break;
          }
          
          return logger;
      }