Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2879

lookupJeeTransactionManager() method in org.jbpm.pvm.internal.tx.JtaTransaction class has problem if used in Tomcat with JOTM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • jBPM 4.3
    • None
    • None

      The lookupJeeTransactionManager() method in org.jbpm.pvm.internal.tx.JtaTransaction class cannot obtain TransactionManager through JNDI look up in Tomcat with JOTM. The reason is there is no separate TransactionManager implementation in JOTM. The class which provides the implementation for UserTransaction is org.objectweb.jotm.Current.java internally implements javax.transaction.TransactionManager. So if we add some code in the lookupJeeTransactionManager() method as below this works:

      if (transactionManager == null)
      {
      UserTransaction ut = (UserTransaction) lookupFromJndi(userTransactionJndiName);
      if (ut instanceof TransactionManager)

      { System.out.println("lookupJeeTransaction:: found TransactionManager"); transactionManager = ((TransactionManager) ut); }

      }

      We need to modify this code such a way so that it works in all server with all JTA implementation. I am in the process of making some patch for this and will send that.

              rebody HuiSheng Xu (Inactive)
              sjayanta Jayanta Sarkar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: