1 Reply Latest reply on Mar 12, 2008 5:08 AM by Holger Lins

    configuration for bean managed transaction

    Holger Lins Newbie

      hi all,

      I want to call the jbpm CommandServiceBean in a UserTransaction. But the problem is, jBPM doesn't optain the transaction. So the database values has been changed before the commit.

      Here's the code

      UserTransaction transaction = sessionContext.getUserTransaction();
      //JNDI look up the get CommandServiceBean
      // creation of an Command, to create new process instance and start it.

      The jbpm.cfg.xml I use.
       <service name="persistence">
       <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
       <field name="isTransactionEnabled"><false /></field>

      And the hibernate.cfg.xml

      <!-- JTA transaction properties (begin) -->
       <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
       <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
       <!-- JTA transaction properties (end) -->

      I have to admit that I can see the changes in the jbpm database not until the transaction commits. But the changes on the database i call during the workflow are directly persistent.

      How can configure jbpm?

      Thanks in advance.