3 Replies Latest reply on Apr 24, 2007 1:04 PM by rfoyle

    Cannot join transaction - Mixing CMT and BMT

      Hi,
      after changing from jboss4.0.4RC1 to jboss4.0.4.GA i get the following warning:
      "Cannot join transaction, not a JoinableCMTTransaction".

      (The data is not synchronized correctly with the database)

      This warning is thrown on the call of a BMT-SLSB out of a CMT-SLSB.

      I know that BMT is not the proposed way to implement transactions, but in my special case i think that it makes sense.

      Concerning the ejb3-spec, the expected behaviour of the calling bean should be to suspend its transaction before invoking the BMT-Bean.

      (With jboss4.0.4RC1 everything works fine)

      Thanks in advance for your help,
      Christian

        • 1. Re: Cannot join transaction - Mixing CMT and BMT

          In my persistence.xml the following properties caused the problem:

          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
          <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/>

          After removing the lines, it worked.

          • 2. Re: Cannot join transaction - Mixing CMT and BMT

            Not sure if you found more information, but here is what I have discovered through testing...

            I experienced the same problem with the transaction configuration. Seems that when you configure Hibernate with a factory_class definition other than the default (JDBC), it assumes that ITis responsible for initiating JTA transactions. If you leave the property configuration out, then Hibernate assumes someone else will be responsible (the container).

            • 3. Re: Cannot join transaction - Mixing CMT and BMT
              rfoyle

              Not sure when to use/not use, but:
              org.hibernate.ejb.transaction.JoinableCMTTransactionFactory

              seemed to do the trick for me.

              -R