Message-Driven Bean Technology

For the client, a message-driven bean is a component that provides business logic to handle whatever JMS messages are sent to it. The technology level of these J2EE components involves specific classes, methods, and fields that must exist to support the EJB life cycle.

Transactions

Like session beans, message-driven beans can use either container-managed transaction demarcation or bean-managed transaction demarcation. The reasons for using either demarcation are the same as those described for session beans in Chapter 12.

As is the case for all other EJBs, transactional attributes are set on the methods a client can call. In the case of message-driven beans, the onMessage method is the only one that has these settings, ...

Get Developing Enterprise Java Applications with J2EE™ and UML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.