1 Reply Latest reply on Feb 23, 2009 12:48 PM by Born Free

    Issues with MDB transactions

    Born Free Newbie

      One of my MDB is behaving very strangely. The issue is as mentioned below.

      When user does some action in web it puts one message in JMS which is consumed by MDB and it calls some SB which runs under transaction. This part works fine. But when request comes from different app for the same action we put that message in jms, mdb picks it up but only this time it does not commits the tx. I commits it only after entire method (onMessage()) is done.

      This looks little bit strange as on of the SB's method has RequiresNew attribute which should commit the tx after the method is complete.

      Example-

      MDB method
      ------------------------
      
      onMessage()
      {
       someClass.method();
      }
      
      someClass
      
      void method()
      {
      //1st call
       bean1.doSomething();
       bean2.doStuff();
       bean3.work();
      }
      
      bean1 - has required attribute set
      bean2 - has RequiresNew
      bean3 - checks for a flag set by bean2 which for workflow 2 does not commits unless entire method is complete.
      


      Any pointer/references in this context is highly appreciated.

      ---Born