4 Replies Latest reply on Feb 8, 2009 6:38 AM by tomerbd2

    can't rollback although i'm doing ctx.setRollbackOnly() in s

    tomerbd2 Newbie


      I have a servlet that calls a session bean with required transaction attribute, the session bean in its test method calls jbpm process.

      so its like this.

      1. servlet
      2. session bean.helloWorld()
      3. in the method helloWorld() i call a jbpm process
      4. at the end of the method helloWorld() i do ctx.setRollbackOnly();
      5. I expect no new rows to enter database however although I did setRollBackOnly() I do see a new row in table: JBPM_TASK

      Anyone can help on this?

      Note that I have configured the hibernate.cfg.xml like this:

       <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
       <!-- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> -->
       <!-- <property name="jta.UserTransaction">java:comp/UserTransaction</property> -->
       <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.OC4JTransactionManagerLookup</property>

      and jbpm.cfg.xml

       <service name="persistence">
       <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
       <field name="isTransactionEnabled"><false/></field>
       <field name="isCurrentSessionEnabled"><true/></field>
       <field name="sessionFactoryJndiName">
       <string value="java:/myHibSessFactJndiName" />
       <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />