-
1. Re: jbpm5.2 local transaction problem
arunvg Feb 24, 2012 8:11 AM (in response to elcric.wu)Are you pointing about the Transaction manager service that is part of the application server.
You can look up the the transaction manager service that is available in application server ( below code for Jboss 4.0.).
While setting the environment
//Set the environment details
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
env.set( EnvironmentName.TRANSACTION_MANAGER, getTransactionManager());
env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() );
I am looking up the transaction manager and using it
getTransactionManager() {
InitialContext ic = new InitialContext();
TransactionManager tm = (TransactionManager) ic.lookup("java:jboss/TransactionManager");
}
Hope it helps .
Cheers