Hello artnaseef, you understand it correctly, the messages are only redirected, when I use container managed transactions and I set the transaction to be roll-backed calling the method /MessageDrivenContext.setRollbackOnly()/.
When I use bean managed transactions, the transaction is roll-backed calling the method /UserTransaction.rollback()./ The user transaction is retrieved by the method /MessageDrivenContext.getUserTransaction()/. But in this case, the message is not redirected to the DLQ. The messages are also not redirected, when an exeption is thrown by /onMessage()/ (without rollback), independent on the transaction mode. When I do the same on WebLogic, the container seems to roll back the transaction in this case, and the messages are redirected to the DLQ. I could live with the fact, that I have to rollback the transaction in the bean code when bean managed transactions are used and an exception occurs. But this doesn't work with WildFly nor with WebLogic. I hope it is clear now. Thomas -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-not-redirected-to-DLQ-when-exception-thrown-by-MDB-tp4709187p4709250.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.