|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
new MQQueueManager (...) does not return... |
« View previous topic :: View next topic » |
Author |
Message
|
tqtuan |
Posted: Fri Nov 21, 2003 3:23 pm Post subject: new MQQueueManager (...) does not return... |
|
|
Newbie
Joined: 21 Nov 2003 Posts: 2
|
Hi,
My application accesses the queue using MQQueueManager(...) to send messages. After awhile, MQ goes down and any attemps to send to the queue throws an exception. When the exception is thrown, I try to recreate the MQQueueManager(...) so that I can access the queue, but the statement "new MQQueueManager(...) never return". Can someone tell me why, please?
below is the code:
Code: |
//set msg options
pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_SET_IDENTITY_CONTEXT;
//set up MQEnvironment
MQEnvironment.channel = channelName;
MQEnvironment.hostname = hostName;
MQEnvironment.port = port;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES);
MQEnvironment.disableTracing();
while (error){
try {
//create queue manager
MQQueueManager queueManager = new MQQueueManager(queueManagerName); //It hangs here when the loop repeats
//access queue
MQQueue outQueue = queueManager.accessQueue(
queuename,
s_OPENQUEUEOPTIONS,
null, // default q manager
null, // no dynamic q name
null); // no alternate user id
MQMessage mqm = new MQMessage();
....code to set message
outQueue.put(mqm, pmo);
outQueue.close();
queueManager.disconnect();
break;
}
catch (....){
continue;
}
} |
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|