Although documented as tested against Glassfish, use of the IBM native MQ resource adapter (wmq.jmsra.rar) by Message Driven Beans in Glassfish is far from being obvious. There are numerous standard configuration facilities defined by EJB and JCA standards that actually do not work, especially regarding activation specifications.
I know three MQ adapters for glassfish: one is the GenericJMSRA from Oracle: here and here. The second is wmq.jmsra from IBM (installation notes) and available from * IBM Fix Central*. To use it, you must indeed own a MQ licence for the queue manager you will connect to but you can download with a free IBM ID. I am using this second Resource Adapter from IBM because it provides access to native MQ API in java which I need in order to address precisely crafted MQ messages to some pure MQ (non-JMS) destinations.
There exists a third--legacy--alternative: JMSJCA here, once my favorite, but support stopped at MQ V6 in Glassfish 3 and JRE6. My attemps to upgrade the source code to MQ v7.5 (or V8 = JMS2.0) with JRE7 in Glassfish 4 (=JMS2.0) or even down to glassfish 3.1 (=JMS1.1) have been defeated on classloader issues and, once that was solved, class cast exceptions / incompatible connection object versions, etc.
I finally got the IBM RA working in a narrow configuration that I document in the reply post. If anyone found alternate remedies and configurations that work too, notably avoiding some pitfalls evoked below, that will be much welcome.
here is a quick listing of the major problems encountered:
- admin objects once created yield: RAR8029:
Resource [ jms/MyAdminObj ] of type [ aor ] is not enabled: solved here MQException: JMSCMQ0001: ... ('MQRC_HOST_NOT_AVAILABLE')caused byJMSWMQ0018: Failed to connect to queue manager '' with connection mode 'Client' and host name 'localhost(1414)'... although you can sware it the relevant remote_host-port-channel-queueManager details are well in place in the created connection pools or even as default values in the ra.xml of the RA being deployedException during endpoint activation for ra [ jmsra ], activationSpecClass [ com.sun.messaging.jms.ra.ActivationSpec ]... revealing that your activation specs actually gets routed to the internal JMS Resource adapter and not the MQ Resource adapter as you believe it shouldWARN j.e.r.r.com.sun.enterprise.connectors.util - RAR8000 : The method setConnectionFactoryLookup is not present in the class : com.sun.messaging.jms.ra.ActivationSpecandWARN j.e.r.r.com.sun.enterprise.connectors.util - RAR8000 : The method setConnectionFactoryLookup is not present in the class : com.sun.messaging.jms.ra.ActivationSpecfollowed by successful deployment of your Message Driven Bean, possibly making you believe, unless you keep an eye on server logs, that your MDB is now listening to the right destination... but will actually not consume a single message
Finding the places where the relevant documentation is stored was also a messy endeavor. Here is:
Clues on the meaning of all parameters in the wmq.jmsra ra.xml in MQ v7.5 can be found in MQ Websphere 7.5 infocenter > Reference >… Properties of WebSphere MQ classes for JMS objects and use of the resource adapter is documented in MQ Websphere 7.5 infocenter > ... The WebSphere MQ resource adapter but will not work strictly as documented