3.7. Principle of operation: message-driven EJBs
Figure 3.7 shows the basic principle of operation of a message-driven EJB.
Figure 3.7. Basic principle of operation of a message-driven EJB.
1. |
The EJB container initializes a pool of instances of the EJB’s implementation class.
|
2. |
The client looks up the queue or topic to which the desired EJB is listening.
|
3. |
The client posts messages to this queue or topic.
|
4. |
The messaging service supplies the messages to the EJB container.
|
5. |
The container calls the implementation’s onMessage() method.
|
Get Applied Enterprise JavaBeans™ Technology 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.