Message-Driven Beans

EJB 2.0 defines a third type of enterprise bean—the message-driven bean—for the purpose of integrating the EJB architecture with the Java Message Service (JMS). This bean type differs most from entity and session beans in that it doesn’t serve a synchronous client. Instead, a client makes use of the business logic defined by a message-driven bean by sending a message to a JMS destination (queue or topic) with which the bean has been associated. When the destination receives a message that satisfies the selector criteria (if any) established for the bean, the container invokes the bean’s onMessage method, which allows the bean to function as a JMS message consumer. You’re responsible for implementing the onMessage method ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 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.