JBoss Community

Re: jbpm5.2 local transaction problem

created by Arun V G in jBPM - View the full discussion

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