[jboss-user] [JBoss jBPM] - can't rollback although i'm doing ctx.setRollbackOnly() in s

tomerbd2 do-not-reply at jboss.com
Thu Feb 5 13:13:45 EST 2009


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207453#4207453

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207453

More information about the jboss-user mailing list