EJB design: Transactions with Message Driven Bean
- Posted by: madhavarao manduva
- Posted on: June 27 2005 16:33 EDT
A question was raised During discusions of our Application design and I have to find out this. If we use Container managed transaction with Required attribute in Message Driven Bean, What would be the starting point of transaction. To be specific whether transaction starts when onMessage() method gets called or when message arrives at JMS Q. Any heplp would be appriciated.
There is always a new transaction started or no transaction at all whenever a MDB is called and it depends on the transaction attribute (required or NotSupported for CMT). But you can bring your clients method and the sending of the message in one transaction.
Hope that helps.
Here is a useful post.