Enterprise JavaBeans 2.0 Support
EJB 2.0 introduces new features for EJB invocation and management. The following key EJB 2.0 features are provided by WAS V5.
Message Driven Beans (MDB)
A Message Driven Bean is a third type of EJB defined by the EJB 2.0 specification. In addition to session and entity EJBs, MDBs provide a means for a process to invoke the function of an EJB running in a different process and most likely on a different server. Unlike session or entity EJBs, MDBs are invoked by sending messages to the MDBs; there is no "home" or "remote" interface associated with an MDB. The Java Message Service (JMS) API is used to accomplish the MDB invocation. A client can direct a JMS message to an EJB 2.0 node where it is
by an MDB. In WAS V5, the JMS API is implemented by IBM's mature MQSeries (now the WebSphere/MQ) product that is provided as part of all WAS V5 versions ”except for WAS Express.
Improved Container Managed Persistence (CMP) Features
The EJB 2.0 specification added several new features to the CMP functions that an EJB container can provide. WAS V5 supports these and some additional container features aimed at further improving EJB performance.
Container Managed Relationships (CMR) for CMP Entity Beans
The WAS EJB container can manage relationships between EJB entity beans. This feature significantly
the programming required to construct sets of interrelated EJBs, such as those often found in sophisticated Web applications.
EJB Query Language (EJBQL)
IBM has provided an SQL-like query language for EJBs in past versions of WAS. A good portion of this query language is now part of the EJB 2.0 specification. WAS V5 supports the 2.0 version of the EJBQL and provides several additional commands and operators.
The local interfaces feature is also new with the EJB 2.0 specification. It applies to the situation where the home and remote (client and server)
of an EJB reside on the same server and
the performance of these types of EJBs by creating a direct link between the home and remote interfaces.
In addition to the new EJB 2.0 features, WAS V5 provides several new EJB features that will have additional performance and development benefits.
Entity Bean Inheritance
With WAS V5 it is possible to write EJB superclasses that contain shared
useful to derived subclasses. This feature allows common object-oriented design practices to be used with EJBs. The WSAD product also supports this feature.
Access Intent Policies
With access intent policies, application developers can specify to the application server the intended use (or not) of EJBs during a transaction, thus allowing the application server to optimize when and how the EJBs are
, that is, written to the container database. Since the actual database
and commits are often the most expensive part of and EJB-based transaction, this feature aids in making the persistence as efficient as possible.
Caching Data Across Transactions
The application server maintains a cache of entity beans for efficient transaction processing. This feature allows static or infrequently changed entity beans to
in the cache across many transactions and can greatly improve overall transaction performance.