确保服务器使用最新可用 IBM MQ 资源适配器维护级别

应用 WebSphere® Application Server 修订包时,为确保 IBM MQ 资源适配器 (resource adapter) 自动更新至最新可用维护级别,可在您的环境中配置所有服务器,以使用对每个节点安装应用的 WebSphere Application Server 修订包中包含的资源适配器的最新版本。

开始之前

随 WebSphere Application Server 安装的 IBM MQ 资源适配器 (resource adapter) 更新包括在 WebSphere Application Server 修订包中。仅当您需要资源适配器的特定版本(而不是最新版本)时,才能使用“更新资源适配器”工具来更新 IBM MQ 资源适配器 (resource adapter)。要安装特定版本的资源适配器,请参阅安装特定维护级别的 IBM MQ 资源适配器。

可使用以下 Jython 和 Jacl 命令来确定 WebSphere Application Server 当前使用的 IBM MQ 资源适配器 (resource adapter) 级别:
  • Jython:
    注: 输入此命令后,必须按两次“回车”键才能运行该命令。
    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 [] []]
    }

关于此任务

如果您的配置出现下列任一情况,并且您想要在您的环境中配置所有服务器以使用最新版本的 IBM MQ 资源适配器 (resource adapter),请使用此任务:
  • 您的环境中的任何应用程序服务器的 JVM 日志包含以下条目:
    WMSG1625E: It was not possible to detect
    the WebSphere MQ messaging provider code at the specified path <null>
  • 一个或多个节点先前手动更新为使用特定维护级别的 IBM MQ 资源适配器 (resource adapter)(它现在已替换为当前 WebSphere Application Server 维护级别中包含的资源适配器的最新版本)。

如果已对您的环境中的所有单元和单个服务器安装执行以下步骤,那么应用新 WebSphere Application Server 修订包时,您的服务器将自动接收 IBM MQ 资源适配器 (resource adapter) 维护。

过程

  1. 启动应用程序服务器。
  2. 将以下 Jython 脚本复制到名为 convertWMQRA.py 的文件中,然后将该文件保存在 profile_root/bin 目录下。
    ras = AdminUtilities.convertToList(AdminConfig.list('J2CResourceAdapter'))
    
    for ra in ras :
       desc = AdminConfig.showAttribute(ra, "description")
       if ((desc == "WAS 7.0 Built In WebSphere MQ Resource Adapter") or (desc == "WAS 7.0.0.1 Built In WebSphere MQ Resource Adapter") or (desc == "WAS Built In WebSphere 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
  3. 使用 wsadmin 工具来运行您刚才创建的 Jython 脚本。
    打开命令提示符并浏览到 profile_root/bin 目录,然后输入以下命令:
    wsadmin -lang jython -f convertWMQRA.py
  4. 停止概要文件中的所有服务器。
  5. 从 profile_root/bin 目录运行 osgiCfgInit 命令。
    注: osgiCfgInit 命令将重置 OSGi 运行时环境使用的类高速缓存。
  6. 重新启动概要文件中的所有服务器。

下一步做什么

如果执行本主题中描述的步骤后仍然遇到问题,并且您先前在管理控制台中的“JMS 提供程序设置”面板中使用更新资源适配器... 按钮来更新您的环境中任何节点上的 IBM MQ 资源适配器 (resource adapter),那么可能会遇到 APAR PM10308 中描述的问题。

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-base-dist&topic=tmj_wmqra_restoredefault
文件名:tmj_wmqra_restoredefault.html