Tuesday, July 1, 2008

Using websphere MQ as a JNDI provider

After some struggle I could finally configure websphere MQ as a JNDI provider. First a simple question, why should one do it
0. For fun, and for your geek pride :-)
1. You usually need a JNDI provider where you store information about queues and destinations etc. You can use FSContext (file system context), or LDAP context. There is even an option where you hardcode queue names and can use NO_JNDI context!
2. File system context looks too "ungeeky", and to get more technical, file system usually is not a reliable thing when we try to configure highly available system, so LDAP context is usually best option.
3. IBM added an option that allows use of MQ Server itself as a JNDI provider. This implementation required support packs MS0B and MS01. IBM has since than merged these support packs in webSphere MQ 6.0.2.3 distribution.

You can test for availability of this option by following steps
1. open websphere MQ explorer
2. right click on JMS administered objects
3. Add (JNDI namespace "other", factory class "com.ibm.mq.jms.context.WMQInitialContextFactory", Required Libraries "mqcontext.jar, com.ibm.mq.pcf-6.0.3.jar, Path of your MQ Java/lib" directory, provider URL="host:port/SYSTEM.DEF.SVRCONN" - (or whatever your server connection channel is)
4. If you are confiugred correctly than you will be able to see your MQ series server objects.

I will add more as I try this further.

No comments:

Post a Comment