2 Replies Latest reply on May 2, 2011 6:21 AM by Hubert Felber

    calls to other beans from my ejb do not participate in the same transaction

    Hubert Felber Newbie



      After migrating from JBoss 4.2.2 to JBoss 5.1 my transactions do not work anymore as desired.


      I have a EJB 2.1 (CMP / CMT) which requires a new transaction on a method call.

      In the method I call other beans which also require transactions (not new) or participate on an existing ones.


      For some reason, these bean calls do not participate in my original EJB method transaction but create a new one and commit after call.


      This prevents me from doing a rollback if anything fails, because some stuff is already commited.

      The same worked fine on JBoss 4.2.2 and drives me crazy on 5.1 because I don't understand it.


      I debugged TxInterceptorCMT.runWithTransations and noticed the fact, that new transactions are created and commited from calls within my EJB method.


      I want all calls from within my EJB method to participate in the same transaction, created on EJB method entry.

      Does anybody have an idea what I did wrong? Where can I look for this?


      I call my EJB from local interface, some of the beans I call from EJB method have also local, some have remote interface. Does this matter?


      I 'd be glad for any help.


      Thank you