WebSphere Application Server Liberty and the IBM MQ resource adapter

The IBM® MQ resource adapter can be installed into WebSphere® Application Server Liberty Version 8.5.5, Fix Pack 2 or later, by using either the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature, depending on which version of the resource adapter you are installing. Alternatively you can, subject to some restrictions, install the resource adapter by using generic Java Platform, Enterprise Edition Connector Architecture (Java EE JCA) support.

General restrictions when installing the resource adapter into Liberty

The following restrictions apply to the resource adapter when using either the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature and also when using generic JCA support:
  • The IBM MQ classes for Java are not supported in Liberty. They must not be used with either the IBM MQ Liberty messaging feature or with the generic JCA support. For more information, see Using WebSphere MQ Java Interfaces in J2EE/JEE Environments.
  • The IBM MQ resource adapter has a transport type of BINDINGS_THEN_CLIENT. This transport type is not supported within the IBM MQ Liberty messaging feature.
  • The IBM MQ Advanced Message Security (IBM MQ AMS) feature is not included in the IBM MQ Liberty messaging feature.

Restrictions when using the Liberty features

With Liberty Version 8.5.5, Fix Pack 2 to Version 8.5.5, Fix Pack 5 inclusive, only the wmqJmsClient-1.1 feature was available and only JMS 1.1 could be used. Liberty Version 8.5.5, Fix Pack 6 added the wmqJmsClient-2.0 feature so JMS 2.0 could be used.

However, the feature that you must use depends on which version of the resource adapter you are using:
  • The IBM WebSphere MQ 7.5.0.6 and later Version 7.5 resource adapters can be used with the wmqJmsClient-1.1 feature only.
  • The IBM MQ 8.0.0.3 and later Version 8.0 resource adapters can be used with wmqJmsClient-2.0 feature only.

Restrictions when using generic JCA support

If you are using generic JCA support, the following restrictions apply:
  • You must specify the level of JMS when using the generic JCA support:
    • JMS 1.1 and JCA 1.6 must be used only with the IBM WebSphere MQ 7.5.0.6 and later Version 7.5 resource adapters.
    • JMS 2.0 and JCA 1.7 must be used only with the IBM MQ 8.0.0.3 and later Version 8.0 resource adapters.
  • It is not possible to run the IBM MQ resource adapter on z/OS® using generic JCA support. In order to run the IBM MQ resource adapter on z/OS, it must be run with the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature.
  • Tracing, and logging are not integrated within the Liberty trace system. Trace is written to a separate file, and it must be enabled by setting the system property. This procedure is the same as configuring the IBM MQ classes for JMS trace facility for a Java Standard Environment. For more information, see Java Standard Environment Trace stanza.
  • If you create a JMS unified domain connection from a domain-specific connection factory, a JMS Exception MQJMS1026 is generated. [V8.0.0.1 Sep 2014]APAR IT02539 fixes this issue.
  • The location of the resource adapter is specified by using the following xml element:
    <resourceAdapter id="mqJms" location="${server.config.dir}/wmq.jmsra.rar">
      <classloader apiTypeVisibility="spec, ibm-api, api, third-party"/>        
    </resourceAdapter> 
    
    Note: The value of the id tag can be anything EXCEPT for wmqJms. If you do use wmqJms as the id, then Liberty is not able to properly load the resource adapter. This is because wmqJms is the id that is used internally to refer to the specific feature for IBM MQ. It actually creates a NullPointerException.
    The following examples show some snippets from a server.xml file:
    
    <!-- Enable features -->    
      <featureManager>       
        <feature>servlet-3.1</feature>     
        <feature>jndi-1.0</feature>    
        <feature>jca-1.7</feature>      
        <feature>jms-2.0</feature>   
      </featureManager>
    
    Tip: Note the use of the jca-1.7 and jms-2.0 features and the lack of the wmqJmsClient-2.0 feature.
    <resourceAdapter id="mqJms" location="${server.config.dir}/wmq.jmsra.rar">
      <classloader apiTypeVisibility="spec, ibm-api, api, third-party"/>        
    </resourceAdapter> 
    
    Tip: Note the use of mqJms for the id, which is preferred. Do not use wmqJms.
    <application id="WMQHTTP" location="${server.config.dir}/apps/WMQHTTP.war" 
    name="WMQHTTP" type="war">    
        <classloader apiTypeVisibility="spec, ibm-api, api, third-party" 
    classProviderRef="mqJms"/>    
    </application>
    
    Tip: Note the classloaderProviderRef back to the resource adapter through the id mqJms; this is to permit IBM MQ specific classes to be loaded.