[jboss-user] [jBPM] - Re: jbpm5.2 local transaction problem

Arun V G do-not-reply at jboss.com
Fri Feb 24 08:08:22 EST 2012

Arun V G [https://community.jboss.org/people/arunvg] created the discussion

"Re: jbpm5.2 local transaction problem"

To view the discussion, visit: https://community.jboss.org/message/719461#719461

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");

Cheers  :)

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120224/954afe72/attachment-0001.html 

More information about the jboss-user mailing list