Design Guidelines

It is hard to say “How did we ever live without message-driven beans?” The fact of the matter is that message-driven beans fill a niche for processing asynchronous messages without the need to create complex components using JMS. Because of this, the important design guidelines to apply are as follows:

  • When do I use message-driven beans?

  • Why should I use message-driven beans instead of JMS?

When to Use Message-Driven Beans

Session beans and entity beans allow you to send JMS messages and to receive them synchronously, but not asynchronously. To avoid tying up server resources, you may prefer not to use blocking synchronous receiving in a server-side component. To receive messages asynchronously, use a message-driven bean.

Get Borland® JBuilder™ Developer’s Guide 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.