1 Reply Latest reply on Feb 24, 2012 8:11 AM by Arun V G

    jbpm5.2 local transaction problem

    Circle Wu Newbie

      There are many articles about configuring jbpm5 with jta transaction.But,My situation is that we decided to use jbpm5 as a inner process engine of web app inside the servlet containner.Is there a sample about configure jbpm5 with local transaction?

        • 1. Re: jbpm5.2 local transaction problem
          Arun V G Newbie

          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 .