[jboss-user] [JBoss jBPM] - Re: jbpm 3.2.2 in Jboss AS 4.2.2 - Transaction Problems

cornhoolio22 do-not-reply at jboss.com
Fri Feb 29 04:24:20 EST 2008


Hope this wokrs ;) Adjust the factory to your name...


  | <jbpm-context>
  |     <service name="persistence">
  |       <factory>
  |         <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
  |           <field name="isCurrentSessionEnabled"><true /></field>
  |           <field name="isTransactionEnabled"><false /></field>
  |         </bean>
  |       </factory>
  |     </service>
  |     <service name="message">
  | 

isCurrentSessionEnabled true means jBPM will request Hibernate to use the current session associated with the current transaction. If there is no current transaction, an exception will be thrown stating no session is active. In this case, you may want to set this isCurrentSessionEnabled to false, and inject the current session into the JbpmContext via the JbpmContext.setSession(session) method. This will also insure that jBPM uses the same Hibernate session as other parts of your application. Note, the Hibenrate session can be injected into a stateless session bean via a persistence context, for example

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

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



More information about the jboss-user mailing list