nterprise messaging has become an increasingly important component of loosely coupled, reliable enterprise frameworks. This is due in large part to the proliferation of enterprise applications (CRM, ERP, SCM, etc.) and disparate enterprise resources (RDBMS/OODBMS, legacy data store, data warehouse, XML/flat file repository, etc.), and the increasing need to integrate these applications into cohesive systems.
Enterprise Java Beans have served as a solution for this new messaging paradigm. The Enterprise Java Beans 2.0 specification defines a new type of enterprise bean to complement the four types of Enterprise Java Beans (EJBs) currently available (two session types and two entity types). The new bean type, Message-Driven Beans (MDBs), provides a reusable J2EE messaging component that can leverage existing investments in J2EE application servers, specifically EJBs.
This second article in a two-part series examining the messaging options available to EJB developers explores Message-Driven Beans. (The first explored the Java Message Service and JavaMail APIs as enterprise resources.)
Author's Note: This 10-Minute Solution is intermediate to advanced. It requires a fundamental knowledge of several Enterprise Java APIs, including EJB, JMS, JavaMail, and JNDI.
What are Message-Driven Beans and how do they compare with the other EJB messaging components?
EJB 2.0 Message-Driven Beans are a new bean type. They provide a reusable J2EE messaging component that can leverage existing investments in J2EE application servers, specifically EJBs. They can offer a more robust and scalable enterprise messaging solution.