Migrating 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 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:

inputMB.jar-ear
The name of the deployed WebSphere Application Server 4.0 jar or ear file containing a stateless session message bean.
jmsListenerConfig.xml
The name of the XML configuration file used to configure the WebSphere Application Server 4.0 JMS listeners.
workingDirectory
The name of a new or existing directory that is used to generate the new message-driven bean and package the outputMDB.jar or .ear file.

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.

outputMDB.jar-ear
The name of the output .jar or .ear file for the migrated message-driven bean application.
options
An optional set of parameters that you can use to control the mb2mdb utility.
-keep
This prevents the tool from clearing out the working directory after completion.
-verbose
This causes the tool to display informational messages as to the progress of the migration and its parameters.
-map listenerHome=bindingHome
This option provides a mechanism to map between the JNDIHomeName specified for a listener in the JMS listener configuration XML file and the default binding home name specified in the inputMB.jar-ear file.

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.


Related tasks
Deploying an enterprise application to use message-driven beans
Developing an enterprise application to use message-driven beans



Searchable topic ID:   tmb_migmb
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/ae/tmb_migmb.html

Library | Support | Terms of Use | Feedback