Browse DevX
Sign up for e-mail newsletters from DevX


EJB Messaging, Part II: Message-Driven Beans-4 : Page 4




Building the Right Environment to Support AI, Machine Learning and Deep Learning

MDBs vs. JMS vs. JavaMail for EJB Messaging
So how do message-driven beans stack up against other EJB messaging options? It depends upon what your architecture requires. Below are a sampling of architectural requirements and the appropriate EJB messaging component (MDB, JMS Resource, JavaMail Resource) to meet that requirement:

  • Asynchrony (receive) Message-driven bean
  • Asynchrony (send) Any of the three
  • Concurrency Message-driven bean
  • EJB Transactional Support JMS Resource or JavaMail Resource
  • E-mail Support JavaMail Resource
  • Guaranteed Delivery Any of the three
  • Non-JMS Client Access (RMI) Session bean with JMS Resource
  • Stateful Message Sender Stateful Session bean with JMS Resource

    The above list represents only a handful of the architectural possibilities and various considerations when selecting an appropriate EJB messaging component. In practice, you will often find yourself using a combination of these components to arrive at a particular messaging solution.

    Messaging Provides Abstraction Layer
    Enterprise messaging is a powerful tool that lends tremendous flexibility and reliability to any enterprise architecture. In our world of increasingly disparate components and backend systems, messaging provides a clean abstraction layer that affords the right balance between system coupling and effective system communication.

  • DevX Java Pro Kyle Gabhart is an independent consultant, trainer, and public speaker specializing in Java technologies, XML, and Web services technologies. Visit his Web site http://www.gabhart.com to view his other writings and his upcoming speaking engagements.
    Thanks for your registration, follow us on our social networks to keep up-to-date