Use this task to migrate an enterprise application that uses message beans with the JMS Listener from WebSphere Application Server 4.0 to use EJB 2.0 message-driven beans.
Why and when to perform this task
This task uses a command line utility, mb2mdb, that takes as its input either a deployed MessageBean.jar module or a deployed Enterprise Application (.ear) that contains a message bean, along with the JMS listener configuration XML file that defines the WebSphere Application Server 4.0 message beans. The result is a new .jar/.ear module that can then be deployed directly into a WebSphere Application Server 5.0 application server.
You can display the usage help for the migration utility, by typing the command mb2mdb at a command line.
To migrate a WebSphere Application Server 4.0 enterprise application that uses message beans to use EJB 2.0 message-driven beans, type the following command at an operating system command line:
mb2mdb inputMB.jar-ear jmsListenerConfig.xml workingDirectory outputMDB.jar-ear options
Where:
Note: By default, the tool clears the working directory after it has completed. If you want to preserve the contents of the working directory, you must specify the -keep option.
If the jmsListenerConfig.xml file contains a deployed EJB home JNDI name that is different to the default binding within the inputMB.jar-ear, use this option to map between the two names.
This enables you to install the output .jar or .ear file for the message-driven bean into an application server and bind the bean with a different JNDIHomeName than is specified in the bean's bindings.xmi.
Results
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 WebSphere Application Server 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. You need to have used the WebSphere Application Server 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 Deploying an enterprise application to use message-driven beans.