Why an onMessage call in Message-driven bean is always a seperate transaction?

Alessandro A. Garbagnati

From the EJB 2.0 specification: "An onMessage call is always a separate transaction, because there is never a transaction in progress when the method is called."

When a message arrives, it is passed to the Message Driven Bean through the onMessage() method, that is where the business logic goes.
Since there is no guarantee when the method is called and when the message will be processed, is the container that is responsible of managing the environment, including transactions.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact