Migrate a JMS listener application to use message-driven beans

Use this task to migrate an enterprise application that uses message beans with the JMS Listener from WAS 4.0 to use EJB 2.0 message-driven beans.

This task uses a command line utility, mb2mdb, that takes as its input either a deployed MessageBean.jar module or a deployed EAR file that contains a message bean, along with the JMS listener configuration XML file that defines the WAS 4.0 message beans. The result is a new JAR or EAR module that can then be deployed directly into a WAS 5.0 application server.

To migrate a WAS 4.0 enterprise application that uses message beans to use EJB 2.0 message-driven beans, run the mb2mdb script from Qshell.

Product

The mb2mdb script is available in WAS.

Authority

No special authority is required to run this script.

Syntax

The syntax of the mb2mdb command is:

mb2mdb inputMB.jar-ear jmsListenerConfig.xml workingDirectory
outputMDB.jar-ear [-keep] [-verbose] [-map listenerHome=bindingHome] 

Parameters

The parameters of the mb2mdb script are:

The result of this task is a new JAR or EAR file for a message-driven bean that can then be deployed directly into a WAS 5.0 application server.

To successfully install the JAR or EAR file, you need to bind the message-driven bean against a listener port defined to the message listener service of the application server. Use the WAS administrative console to define the listener port, which defines the JMS connection factory and destination that a message-driven bean bound to it listens on. For more information about installing and configuring a JAR or EAR file for a message-driven bean, see Deploy an enterprise application to use message-driven beans.