Ensuring that servers use the latest available IBM MQ resource adapter maintenance level
To ensure that the IBM MQ resource adapter is automatically updated to the latest available maintenance level when applying WebSphere Application Server fix packs, we can configure all servers in the environment to use the latest version of the resource adapter contained in the WAS fix pack that we have applied to the installation of each node.
Updates to the IBM MQ resource adapter installed with WAS are included in WAS Fix Packs. We must only update the IBM MQ resource adapter using the "Update resource adapter facility if you require a specific version of the resource adapter, instead of the most recent version. To install a specific version of the resource adapter, see Install a specific maintenance level of the IBM MQ resource adapter.
Use the following Jython and Jacl commands to determine the level of the IBM MQ resource adapter currently being used by WAS:
- Jython:
We must press Return twice after entering this command in order to run it.
wmqInfoMBeansUnsplit = AdminControl.queryNames("WebSphere:type=WMQInfo,*") wmqInfoMBeansSplit = AdminUtilities.convertToList(wmqInfoMBeansUnsplit) for wmqInfoMBean in wmqInfoMBeansSplit: print wmqInfoMBean; print AdminControl.invoke(wmqInfoMBean, 'getInfo', '')- Jacl:
set wmqInfoMBeans [$AdminControl queryNames WebSphere:type=WMQInfo,*] foreach wmqInfoMBean $wmqInfoMBeans { puts $wmqInfoMBean; puts [$AdminControl invoke $wmqInfoMBean getInfo [] []] }
Use this task if any of the following circumstances apply to the configuration, and we want to configure all servers in the environment to use the latest version of the IBM MQ resource adapter:
- The JVM logs of any application server in the environment contain the following entry:
WMSG1625E: It was not possible to detect the IBM MQ messaging provider code at the specified path <null>- One or more nodes has previously been manually updated to use a specific maintenance level of the IBM MQ resource adapter that is now superseded by the latest version of the resource adapter contained in the current WAS maintenance level.
When we have performed the following steps for all cells and single server installations in the environment, the servers will automatically receive maintenance to the IBM MQ resource adapter when a new WAS fix pack is applied.
Tasks
- Start the application server. If the profile is part of a network deployment configuration, start the deployment manager and all node agents. If the profile contains an administrative agent, start the administrative agent.
- Copy the following Jython script into a file called convertWMQRA.py, then save it into the profile_root/bin directory.
ras = AdminUtilities.convertToList(AdminConfig.list('J2CResourceAdapter')) for ra in ras : desc = AdminConfig.showAttribute(ra, "description") if ((desc == "WAS 7.0 Built In IBM MQ Resource Adapter") or (desc == "WAS 7.0.0.1 Built In IBM MQ Resource Adapter") or (desc == "WAS Built In IBM MQ Resource Adapter")): print "Updating archivePath and classpath of " + ra AdminConfig.modify(ra, [['archivePath', "${WAS_INSTALL_ROOT}/installedConnectors/wmq.jmsra.rar"]]) AdminConfig.unsetAttributes(ra, ['classpath']) AdminConfig.modify(ra, [['classpath', "${WAS_INSTALL_ROOT}/installedConnectors/wmq.jmsra.rar"]]) AdminConfig.save() #end if #end for- Use the wsadmin tool to run the Jython script that we have just created.
Open a command prompt and navigate to the profile_root/bin directory, then enter:
wsadmin -lang jython -f convertWMQRA.pyIf we run the script against a profile that is part of a network deployment configuration, the script updates all profiles that need updating in that configuration. A full resynchronization might be necessary if we have pre-existing configuration file inconsistencies.
- If we are running in a network deployment configuration, ensure that the node agents are fully re-synchronized.
- Stop all servers in the profile. If the profile is part of a network deployment configuration, also stop any cluster members in the configuration, stop all node agents in the configuration, and stop the deployment manager. If the profile contains an administrative agent, stop the administrative agent.
- Run the osgiCfgInit command from the profile_root/bin directory. If the profile is part of a network deployment configuration, run the osgiCfgInit command from the profile_root/bin directory of every profile that is part of the configuration.
The osgiCfgInit command resets the class cache used by the OSGi runtime environment.
- Restart all servers in the profile. If the profile is part of a network deployment configuration, also restart any cluster members in the configuration, restart all node agents in the configuration, and restart the deployment manager. If the profile contains an administrative agent, restart the administrative agent.
What to do next
If we continue to experience problems after performing the steps described in this topic, and we have previously used the Update resource adapter... button on the JMS Provider Settings panel in the administrative console to update the IBM MQ resource adapter on any nodes in the environment, it is possible that we are experiencing the issue described in APAR PM10308.
Synchronize nodes Add, manage, and remove nodes JMS provider settings