0 Replies Latest reply on May 16, 2006 8:13 AM by Bogdan Sturzoiu

    call RequiresNew method from Required method

    Bogdan Sturzoiu Newbie

      Hi.

      I find at
      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3807209
      a similar problem with the next scenario, but is not identical.

      I have the following problem:
      into a MessageListener class is implemented:

      try {
      call one session bean method that have Required transaction attribute
      (SessionBean1: methodA)

      call other session bean method that have Required
      (SessionBean2: methodB) with some parameter values
      } catch(Exception ) {
      call (SessionBean2: methodB) with other parameter values
      } finally {
      call SessionBean3:methodC with requiresNew transactional type
      }

      All I want is that the finally block is executed always, and that whatever SessionBean3 is doing in his methodC is committed even when the MessageListener that is calling SessionBean3 is rolling back his transaction because of a failure. However, what I can see from my unit testing is that the transaction of SessionBean3 is NOT committed at all."



      Thank you for support.