hi, i am trying to delegate the transactional behaviour of Jbpm on the container and for that I changed the jbpm.cfg.xml file to include:
| <service name="persistence"> | <factory> | <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory"> | <field name="isTransactionEnabled"> | <false /> | </field> | </bean> | </factory> | </service> | and the file hibernate.cfg.xml to: | <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> | <property name="hibernate.connection.datasource">java:/jdbc/DefaultDS</property> | <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property> | <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> | With this, I have Jbpm using my database and as it was said to me, the transactional behaviour should be left to jboss. >From my understanding, any changes to my process definitions and process >instances in the DB should be inserted in the transaction of the SSB that is >using Jbpm. Starting from this, in my code and when saving processes to the >DB, I did not made any JbpmContext.close() afterwards, but with this, nothing >was being saved to the DB. Only with the explicit invocation of the close >method, the processes are saved. On the other hand, if I close the context and then someting goes wrong and an exception is thrown or the setRollbackOnly method is invoked in the EJBContext, the processes are saved and that is not the desired behaviour. I want the processes to be saved if the container transaction commits and only in that case. This is my transaction specification in the DD: | <assembly-descriptor> | <container-transaction> | <method> | <ejb-name>Bean</ejb-name> | <method-name>*</method-name> | </method> | <trans-attribute>Required</trans-attribute> | </container-transaction> | <container-transaction> | <method> | <ejb-name>Bean</ejb-name> | <method-name>methodA</method-name> | </method> | <method> | <ejb-name>Bean</ejb-name> | <method-name>methodB</method-name> | </method> | <trans-attribute>RequiresNew</trans-attribute> | </container-transaction> | </assembly-descriptor> | Maybe I am not seeing the thing right but I would appreciate any help. best regards View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941221#3941221 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941221 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
