Message-driven bean best practices
We have seen throughout this book some guidelines and best practices for entity and session bean development. We continue this theme with an overview of some of the message-driven bean best practices, as well as some common mistakes to avoid, in the form of do or do not:
Do delegate business logic to another handler— In our example, we show that the MDB’s responsibility is to receive the message, but the handling of it is delegated to another process, in our case a stateful session bean. This best practice holds true in any interaction pattern mentioned above.
Do consider making the MDB a request/reply controller— We could have taken this delegation a step further, and delegated the reply handling to another ...
Get EJB 2.0 Development with WebSphere Studio Application Developer 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.