↓ Skip to main content

WebSphere MQ Java in J2EE

Thanks once again to Paul Titheridge, this time for pointing me to this technote covering the use of the WebSphere MQ Java APIs in a J2EE/JEE environment. It seems that IBM does now support the use of the WebSphere MQ Java interfaces in a WebSphere Application Server environment (check the supported software for your release) but this technote provides you with lots of reasons why you shouldn’t! The Java interfaces do have functionality that isn’t currently available in the JMS API (for example message segmentation and important parts of message grouping) but that needs to be weighed carefully against the drawbacks. JMS should always be the default option unless you have a very good reason not to use it.

Related

WebSphere MQ and the client container

WebSphere Application Server has shipped with JAR files for the WebSphere MQ JMS provider since Version 5.0 as they were, at the time, required for the embedded messaging provider. However, if those JAR files do not match the version of WebSphere MQ you are using (as is the case with WebSphere Application Server V6.0 and WebSphere MQ V6) you may see error messages such as java.lang.NoSuchFieldError: msgToken. As documented on the support site and in the InfoCenter, on the server-side the correct thing to do is update the MQ_INSTALL_ROOT WebSphere variable to point to your real WebSphere MQ installation. What I haven’t seen documented anywhere is what to do in the case where you are using the WebSphere Application Server client container. In that scenario, you need to modify the JMS_PATH environment variable defined in the launchClient batch file in the application server bin directory.

JMS connection pooling

I’ve mentioned one of my colleague Paul Titheridge’s articles before (on JMS Application Server Facilities) and he’s just started a new related series which is well worth taking a look at. This time Paul has turned his attention to the myriad of connection pool properties provided by WebSphere Application Server and what they mean when using WebSphere MQ as the JMS provider. As before, Paul has provided some thoroughly worked examples to help explain the implications of changing different values.