[esb-issues] [JBoss JIRA] Created: (JBESB-1373) Problems with ESB/jBPM integration when JTA is used

Jiri Pechanec (JIRA) jira-events at lists.jboss.org
Wed Nov 28 03:56:46 EST 2007


Problems with ESB/jBPM integration when JTA is used
---------------------------------------------------

                 Key: JBESB-1373
                 URL: http://jira.jboss.com/jira/browse/JBESB-1373
             Project: JBoss ESB
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 4.2.1
            Reporter: Jiri Pechanec


To successfully use JTA in started via JCA listener inside jBPM process the jBPM config files must contain this values
hibernate.cfg.xml
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
    <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
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>

When this configuration is used then the transaction started by JCA listener is propagated to jBPM and is not committed/closed by jBPM.

But under this configuration the jBPM JobExecutor running inside ESB does not work
09:41:13,556 ERROR [JobExecutorThread] exception in job executor thread. waiting 20000 milliseconds
org.hibernate.HibernateException: Unable to locate current JTA transaction
        at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
        at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
        at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:104)
        at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:359)
        at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
        at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
        at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)

The obvious problem is that the Executor do not have any JTA transaction available.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the esb-issues mailing list