Network Deployment (Distributed operating systems), v8.0 > Migration and coexistence > Migrate Messaging resources > Migrate from WAS v5 embedded messaging
Example: Migrating a message-driven bean from v5 embedded messaging - stage 2
By following this example, you can migrate a message-driven bean application on a v6 or later node from using v5.1 default messaging JMS resources and listener port to using default messaging provider JMS resources.
This topic provides a contextual description of the migration, then a summary of the steps involved.
This example follows on from the example described in Example: Migrating a message-driven bean from v5 embedded messaging - stage 1.
Consider the example scenario, before replacing the v5.1 JMS resources with JMS resources of the later version, shown in the following figure MDB application scenario before replacing the v5 JMS resources with JMS resources of a later version.
Figure 1. MDB application scenario before replacing the v5 JMS resources with JMS resources of a later version
JMS resources: a JMS queue connection factory, PPQCF; two JMS queues, InQ and OutQ; and a listener port, MDBPort. These resources are to be replaced by equivalent resources of the later version." />
- The JMS resources, a JMS queue connection factory (PPQCF) and JMS queues (InQ and OutQ), are managed as v5.1 default messaging JMS resources. The administrative name for the embedded messaging JMS resources is changed from WebSphere JMS Provider resources to V5 default messaging provider resources. For example, in the admin console of the later version the queue connection factory can be found by clicking Resources -> JMS -> JMS providers -> V5 default messaging provider -> [Additional Properties] Queue connection factories .
- On the admin console, display the listener port by clicking Servers -> Server Types -> WebSphere application servers -> server_name
-> [Communications] Messaging > Message Listener Service > [Additional Properties] Listener Ports > port_name , where server_name
is server1 and port_name is MDBPort.
To replace the v5.1 default messaging JMS resources with equivalent default messaging provider JMS resources of the later version...
Procedure
- Delete the v5.1 JMS resources:
- Display the collection list of v5.1 JMS queue connection factories. Click Resources -> JMS -> JMS providers -> V5 default messaging provider -> [Additional Properties] Queue connection factories .
- Select the check box next to the queue connection factory, PPQCF.
- Click Delete
- Click OK.
- Display the collection list of v5.1 JMS queues. Click Resources -> JMS -> JMS providers -> V5 default messaging provider -> [Additional Properties] Queues.
- Select the check box next to the queues, INQ and OUTQ.
- Click Delete
- Click OK
- Save your changes to the master configuration.
- Create a JMS queue connection factory in the later version, to replace the v5.1 JMS queue connection factory. (To use a unified JMS connection factory instead of the domain-specific JMS queue connection factory, also rewrite the MDB application to use JMS 1.1 interfaces). For example, use the admin console...
- Display the collection list of JMS queue connection factories for the default messaging provider. Click Resources -> JMS -> JMS providers -> Default messaging provider -> [Additional Properties] Queue connection factories
- Click New
- On the New JMS queue connection factory page, set the following properties:
All other properties have default settings. The name and JNDI name properties match the same properties on the v5.1 JMS queue connection factory. The connection factory creates connections to the service integration bus called wasA.
Name: PPQCF JNDI Name: jms/SamplePPQCF Bus name wasA
- Click OK.
- Save your changes to the master configuration.
- Create JMS queues in the later version to replace the v5.1 JMS queues For example, use the admin console to complete the following steps for the input JMS queue:
- Display the collection list of JMS queues for the default messaging provider. Click Resources -> JMS -> JMS providers -> Default messaging provider -> [Additional Properties] Queues .
- Click New
- On the New JMS queue page, set the following properties for the JMS queue called InQ that is backed by the existing bus destination also called InQ:
All other properties have default settings. The Queue name property specifies the name of the bus queue used to store and process messages for the JMS queue.
Name: InQ JNDI Name: jms/SampleInputQueue Queue name: InQ
- Click OK This returns you to the collection list of JMS queues.
- Click New
- On the New JMS queue page, set the following properties for the JMS queue called OutQ that is backed by the existing bus destination also called OutQ:
All other properties have default settings. The Queue name property specifies the name of the bus queue used to store and process messages for the JMS queue.
Name: OutQ JNDI Name: jms/SampleOutputQueue Queue name: OutQ
- Click OK.
- Save your changes to the master configuration.
- Create a JMS activation specification to replace the v5.1 listener port. The JMS activation specification is used to deploy the MDB application as a J2EE Connector Architecture (JCA) 1.5-compliant resource, as a listener on the JMS queue InQ. For example, use the admin console...
- Display the collection list of JMS activation specifications for the default messaging provider. Click Resources -> JMS -> JMS providers -> Default messaging provider -> [Additional Properties] Activation specifications .
- Click New
- On the New JMS activation specification page, set the following properties:
All other properties have default settings.
Name: PPAS Name: jms/SamplePPAS Destination JNDI Name: jms/SampleInputQueue
- Click OK This returns you to the collection list of JMS activation specifications.
- Save your changes to the master configuration.
- Save your changes to the master configuration. After replacing the v5.1 JMS resources with equivalents in the later version, the MDB application scenario becomes as shown in the following figure:
Figure 2. MDB application scenario after replacing the v5.1 JMS resources with v7.0 JMS resources
JMS resources, but equivalent v7.0 resources have been created for use by the MDB application when it has been redeployed as a JCA 1.5-compliant resource with the JMS activation specification. The v7.0 resources are: a JMS queue connection factory, PPQCF; two JMS queues, InQ and OutQ; and a JMS activation specification, PPAS." />- Redeploy the MDB application to use the JMS activation specification, as described in Deploy and administering enterprise applications. Ensure you select the Do not overwrite existing bindings option.
Accept the defaults for all installation steps except for the following:
- Delete the Listener Port binding
- Set the activation specification binding to jms/SamplePPAS.
- Click OK.
- If no other v5.1 applications use the WebSphere MQ client link, delete it.
- Display the list of WebSphere MQ client links for the messaging engine. Click Service integration -> Buses -> bus_name -> [Topology] Messaging engines -> engine_name -> [Additional Properties] WebSphere MQ client links , where bus_name is wasA and engine_name is wasA.server1-wasA.
- Select the check box next to the link, Default.MQClientLink.
- Click Delete
- Click OK
- Save your changes to the master configuration.
Results
You should now be able to use the MDB application with the JMS resources in the later version. On the Enterprise Applications panel (Applications -> Application Types -> WebSphere enterprise applications ) ensure that the MDB application is started. There should be no errors displayed in the admin console at this point. If there are any errors, check the SystemOut log for more information about the problem.