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.
Forgot to mention the environment details.
We are using Jboss 4.2.2 with JBoss messaging 1.4 SP3. Our app also uses Hibernate and Spring.