Skip to content

Commit

Permalink
JBPM-6718 - Cleanup AuditLoggerFactory from unused import and fix (#1105
Browse files Browse the repository at this point in the history
)

incorrect comments
fff
  • Loading branch information
dmvolod authored and Tihomir Surdilovic committed Jan 2, 2018
1 parent 13eb988 commit 5d87760
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import javax.jms.Queue;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManagerFactory;

import org.jbpm.process.audit.jms.AsyncAuditLogProducer;
import org.kie.api.runtime.Environment;
Expand Down Expand Up @@ -120,10 +119,9 @@ public static AbstractAuditLogger newJPAInstance() {
}

/**
* Creates new instance of JPA audit logger with given EntityManagerFactory
* Creates new instance of JPA audit logger with given Environment
* NOTE: this will build the logger but it is not registered directly on a session: once received,
* it will need to be registered as an event listener
* @param emf EntityManagerFactory used to provide JPA entity manager instances on demand.
* @param env Environment instance to be used
* @return new instance of JPA audit logger
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
import org.jbpm.query.jpa.impl.QueryAndParameterAppender;
import org.jbpm.query.jpa.impl.QueryCriteriaUtil;
import org.kie.api.runtime.Environment;
import org.kie.api.runtime.EnvironmentName;
import org.kie.internal.runtime.manager.audit.query.NodeInstanceLogDeleteBuilder;
import org.kie.internal.runtime.manager.audit.query.NodeInstanceLogQueryBuilder;
import org.kie.internal.runtime.manager.audit.query.ProcessInstanceLogDeleteBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import java.util.HashMap;

import org.jbpm.process.audit.AuditLoggerFactory.Type;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
Expand Down Expand Up @@ -68,11 +67,12 @@ public void setUp() throws Exception {
}

// working memory logger
AbstractAuditLogger dblogger = AuditLoggerFactory.newInstance(Type.JPA, session, null);
AbstractAuditLogger dblogger = AuditLoggerFactory.newJPAInstance(session.getEnvironment());
assertNotNull(dblogger);
assertTrue(dblogger instanceof JPAWorkingMemoryDbLogger);

auditLogService = new JPAAuditLogService(env);
session.addEventListener(dblogger);
}

@After
Expand Down

0 comments on commit 5d87760

Please sign in to comment.