2 Replies Latest reply on Jan 19, 2006 3:49 PM by chetan aggarwal

    SessionBean with method transaction type

    Dirk Koehler Newbie

      Hi everybody,

      I have a problem with TX handling of CMT in particular with "RequiresNew" types:

      Following scenario:

      I have a session bean here where all remote interface methods are declared with an transaction type "Required" - means per definition all method calls to it will open transactions.

      From this bean I call another Session bean method (different bean) declared with TX type "RequiresNew" (I verified via ejb-jar.xml as well)

      We introduced this behavior to workaround a DB deadlock.

      The Problem: I still see that this "inner" call does not commit any database changes after returning to the caller bean and the same outter transaction (verified via TX-ID) is used during processing the "RequiresNew" call -

      How can this be... a new transaction is supposed to be started and the current one to be suspended (which will be resumed after the "inner" TX was commited).

      Hope somebody experienced the same issue or is using "RequiresNew" so (s)he could point me to a solution.
      Did I miss anything or is JBoss behaving not according to the definition of RequiresNew (http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/transactions/transactions7.html)?