[jboss-user] [JBossMQ] - Nested transaction is not working

jonathanztaub do-not-reply at jboss.com
Sat Aug 2 20:58:08 EDT 2008

I have a message driven bean which also persists data to the database.
In case data persistence fails, I just log out an error and rollback the transaction. This causes the JMS transaction to be rolled back as well, resulting in redelivery of the message.

I'm not interested in message redelivery so I created another method in the message driven bean, and configured it to have a RequiresNew transaction attribute in the ejb-jar.xml. The idea is that if database persistence fail, I can perform a rollback in the second method, thereby rolling back only the database transaction. However, this doesn't seem to work as the JMS transaction is rolledback as well.

My questions are:
* Am I misunderstanding how transaction demarcation and rollback work?
* Are there specific issues with JMS I'm unaware of?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168313#4168313

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168313

More information about the jboss-user mailing list