20.3. Building, Deploying, and Running the Message-Driven Bean Example

Like the session bean we saw previously, and the entity bean we'll examine next, the message-driven bean needs to be described via a deployment descriptor that is named ejb-jar.xml. We'll also once again need a WebLogic-specific deployment descriptor to further describe the bean.

The ejb-jar.xml file is shown in Listing 20.2. We provide an <ejb-name> and <ejb-class> as with the other bean types, but a message-driven bean has no interfaces so that part of the deployment descriptor is omitted.

We then have a number of MDB-specific configuration settings. The settings of <acknowledge-mode>, <destination-type>, and <subscription-durability> allow us to set values that in the non-EJB ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services 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.