Configure the application server to use the latest resource adapter maintenance level

To ensure that the IBM MQ resource adapter is automatically updated to the latest available maintenance level when you apply 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 WebSphere Application Server fix pack that we have applied to the installation of each node.


Before starting

Important: If we are using WebSphere Application Server Version 8.5 or earlier on any platform, do not install the IBM MQ Version 8.0 or later resource adapter into the application server. The IBM MQ Version 8.0 or later resource adapter can only be deployed into an application server that supports JMS 2.0. However, WebSphere Application Server Version 8.5 or earlier only supports JMS 1.1. These versions of WebSphere Application Server come with the IBM WebSphere MQ Version 7.0 resource adapter, which can be used to connect to a IBM MQ Version 8.0 queue manager using either the BINDINGS or CLIENT transport.


Use this task if any of the following circumstances apply to your 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 show the following IBM MQ resource adapter version information after WebSphere Application Server Version 7.0 Fix Pack 1 or later has been applied:
    WMSG1703I:RAR implementation Version 7.0.0.0-k700-L080820
    
  • 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 WebSphere Application Server maintenance level.

The profile_root directory that the examples refer to is the home directory for the WebSphere Application Server profile, for example C:\Program Files\IBM\WebSphere\AppServer1.

When you have performed the following steps for all cells and single server installations in the environment, your servers automatically receive maintenance to the IBM MQ resource adapter when a new WebSphere Application Server fix pack is applied.


Procedure

  1. 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.
  2. Check the maintenance level of the IBM MQ resource adapter.
    1. Open a command prompt window and change to the profile_root\bin directory. For example, enter cd C:\Program Files\IBM\WebSphere\AppServer1\bin.
    2. Start the wsadmin tool by entering wsadmin.bat -lang jython, then if prompted to do so, enter your username and password.
    3. Type the following command, then press Return twice:
      wmqInfoMBeansUnsplit = AdminControl.queryNames("WebSphere:type=WMQInfo,*")
      wmqInfoMBeansSplit = AdminUtilities.convertToList(wmqInfoMBeansUnsplit)
      for wmqInfoMBean in wmqInfoMBeansSplit: print wmqInfoMBean; print AdminControl.invoke(wmqInfoMBean, 'getInfo', '')
      
      We can also run this command in Jacl. For further information about how to do this, see Ensuring that servers use the latest available IBM MQ resource adapter maintenance level in the WebSphere Application Server product documentation.
    4. Find the WMSG1703I message in the displayed output from the command and check the resource adapter level. For example, for WebSphere Application Server Version 7.0 Fix Pack 15, the message should be:
      WMSG1703I: RAR implementation Version 7.0.1.3-k701-103-100812
      
      This message shows that the version is 7.0.1.3-k701-103-100812, which is the correct resource adapter level for this fix pack. However, if the following message is displayed instead, this means that we need to adjust the resource adapter to the correct level of maintenance for Fix Pack 15.
      WMSG1703I: RAR implementation Version 7.0.0.0-k700-L080820
      

  3. Copy the following Jython script into a file called convertWMQRA.py, then save it into the profile root directory, for example C:\Program Files\IBM\WebSphere\AppServer1\bin.
    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"):
        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
    
    Tip: When saving the file, make sure that it is saved as a python file rather than a text file.
  4. Use the WebSphere Application Server wsadmin tool to run the Jython script that we have just created. Open a command prompt and navigate to the \bin directory in the home directory for the WebSphere Application Server, for example C:\Program Files\IBM\WebSphere\AppServer1\bin directory, then type the following command and press Return:
    wsadmin -lang jython -f convertWMQRA.py
    
    If prompted to do so, enter your username and password. Note: If you 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 you have pre-existing configuration file inconsistencies.
  5. If we are running in a network deployment configuration, ensure that the node agents are fully re-synchronized. For more information, see Synchronizing nodes using the wsadmin scripting tool or Adding, managing, and removing nodes.
  6. 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.
  7. Run the osgiCfgInit command from the profile_root/bin directory. The osgiCfgInit command resets the class cache used by the OSGi runtime environment. 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.
  8. 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.
  9. Repeat step 2 to check that the resource adapter is now at the correct level.


What to do next

If you continue to experience problems after performing the steps described in this topic, and you have previously used the Update resource adapter button on the JMS Provider Settings panel in the WebSphere Application Server 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.

Parent topic: Configure JMS resources


Related information


Related information for WebSphere Application Server Version 8.5.5