Hi.
I'm doing a deep dive into the new jbpm6 PerProcessInstanceRuntimeManager
functionality.
Impressive.
One minor observation is that it seems that both the engine.getKieSession().destroy(); and
disposeRuntimeEngine(engine); function calls in the init() function are redundant.
Neither of these calls seem necessary.
Previous to these function calls, an instance of
DisposeSessionTransactionSynchronization() was already registered .... which takes care of
appropriately disposing the session after the JTA transaction has committed.
Subsequently, when either (or both) of these redundant calls to close the session prior to
the transaction has committed, the following exception occurs:
java.lang.IllegalStateException: Illegal method call. This session was previously
disposed.
at
org.drools.core.reteoo.DisposedReteooWorkingMemory.getProcessRuntime(DisposedReteooWorkingMemory.java:262)
[drools-core-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.getProcessRuntime(StatefulKnowledgeSessionImpl.java:868)
[drools-core-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at
org.drools.persistence.SingleSessionCommandService$SynchronizationImpl.afterCompletion(SingleSessionCommandService.java:504)
[drools-persistence-jpa-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at
org.drools.persistence.jta.JtaTransactionSynchronizationAdapter.afterCompletion(JtaTransactionSynchronizationAdapter.java:22)
[drools-persistence-jpa-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
I'm testing in an EAP6.1 environment using JTA transactions provided by the app
server.
commenting out those apparently redundant function calls does not seem to cause any other
negative side effects and the session is still closed by the
DisposeSessionTransactionSynchronization instance.
jeff
--
Jeffrey Bride
Senior Principal Solution Architect
Global Partner Enablement
Red Hat (
www.redhat.com)
cell: 303.523.7885