anchor.diff:  
   [source,java]
   ----
  -EntityManagerFactory emf = this.createEntityManager();
  -StatefulKnowledgeSession ksession = this.buildKnowledgeSession();
  -AbstractAuditLogger auditLogger = AuditLoggerFactory.newJPAInstance(emf);
  +KieSession ksession = ...;
  +AbstractAuditLogger auditLogger = AuditLoggerFactory.newInstance(Type.JPA, ksession, null);
   ksession.addProcessEventListener(auditLogger);
   
   // invoke methods one your session here
  
positive.code:   http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
    xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance>
  
    <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
  
negative.code: jmsProps.put("jbpm.audit.jms.transacted", true);
  jmsProps.put("jbpm.audit.jms.connection.factory", factory);
  jmsProps.put("jbpm.audit.jms.queue", queue);
  AbstractAuditLogger auditLogger = AuditLoggerFactory.newInstance(Type.JMS, ksession, jmsProps);
  ksession.addProcessEventListener(auditLogger);
  
  // invoke methods one your session here
  