One of the new features of MQ 7.5 is the ability to identify a connection to a queue manager by setting an application name.
The "What's new in WebSphere MQ Version 7.5" topic (http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.doc%2Fmq50095_.htm) in InfoCenter refers to another topic for setting up the environment class/object when using the WMQ classes for Java (if that's the language/API used to develop the client application).
I also found how to achieve the same result using the WMQ classes for JMS (http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.doc%2Fja11070_.htm).
Whether using JMS or the WMQ classes for Java, the key stop to identify a connection is basically setting a property in either the connection factory (if using JMS) or in the MQEnvironment or MQQueueManager (if using the WMQ classes for Java).
For JMS, the property is WMQ_APPLICATIONNAME, defined in com.ibm.msg.client.wmq.WMQConstants.
For the WMQ classes for Java, the constant is defined in MQConstants.APPNAME_PROPERTY.
However, there is no equivalent constant definition for the XMS interface.
Looking at the constant definition for WMQ_APPLICATIONNAME in com.ibm.msg.client.wmq.WMQConstants, I though that by just passing the string "XMSC_WMQ_APPNAME" as the property name, I would be able to gain the same functionally, but this doesn't work.
How can I identify a connection to a queue manager with an appplication name in XMS?
Pinned topic How to identify a connection to a queue manager with an app name in XMS?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-13T18:21:15Z at 2012-12-13T18:21:15Z by SystemAdmin
Shashikanth@BLR 0600007SDS160 Posts
Re: How to identify a connection to a queue manager with an app name in XMS?2012-12-05T04:09:05ZThis is the accepted answer. This is the accepted answer.Name of the exe can be used to identify a XMS or C application. MQ Java/JMS has that property because all MQ Java/JMS applications used to have the same "WebSphere MQ Client for Java" application name. With that it was difficult to uniquely identify applications.
Re: How to identify a connection to a queue manager with an app name in XMS?2012-12-05T18:27:34ZThis is the accepted answer. This is the accepted answer.
- Shashikanth@BLR 0600007SDS
Relying on the path and name of the executable is less than desirable when the developer does not have control over the installation directory or deployment procedure.
My guess is that the XMS library (or one of its inner components) is able to set the application name anyway (hence the name of the exe appears as the app name), it's just that this feature needs to be exposed publicly. My guess is that even when the XMS library gets the XMSC_WMQ_APPNAME string as a connection factory's property, there's missing code that acts upon it.
If anyone with deep knowledge of the internals of XMS could confirm this, it'd be much appreciated.
Re: How to identify a connection to a queue manager with an app name in XMS?2012-12-13T18:21:15ZThis is the accepted answer. This is the accepted answer.Seems like out team got confirmation from IBM that this is by design. They think that having the path+exe name is good enough, which is true for console/GUI apps. But when running as a DLL inside a Web app or a service (Windows or WCF), I don't think it actually helps. In this scenario (using XMS in a DLL), the support for the connection's ID is very similar to what used to be for JMS, meaning, the process name is fixed and you have no control over it.