Hi All,
Is there any way to determine whether the MQ channel is active,before we put/get to a queue.I know that we can check it from the UI.I want to embedd a logic in my code to do the same.
We are using webSphere MQ adapter.
TIA
Hi All,
Is there any way to determine whether the MQ channel is active,before we put/get to a queue.I know that we can check it from the UI.I want to embedd a logic in my code to do the same.
We are using webSphere MQ adapter.
TIA
Danny - Yes, MQ provides a Java API that can be used to ping the QueueManager you’re trying to connect to. We are using this approach as a means to provide connection status to our QueueManager.
Specifically, the MQQueueManager class has a isConnected() method that you can use. But you must be sure to call its disconnect() method to ensure the connection gets torn down. MQ does not close connections unless asked to by the client.
Cheers,
Rajesh
Rajesh,
I was going thru the MQSeries package and there is a java service “wm.MQSeries.MQSeriesQMgrUI:testQMgr”.There is not sufficient documentation how to use that?Any Inputs?
TIA
Hi Danny - I’m not sure how to use that service in the MQSeries package either. I tried running it too but am not sure what the inputs are. There has to be an input because an IS can theoretically connect to many QueueManagers.
But you don’t need wM’s service in the MQSeries package. Just write your own java service using the methods provided in the MQQueueManager class. That’s probably the easiest and most reliable way to ping the MQ server.