|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reconnect after reason code 2195 but connection is unusable |
« View previous topic :: View next topic » |
Author |
Message
|
SirHelmi |
Posted: Fri Mar 18, 2011 7:29 am Post subject: Reconnect after reason code 2195 but connection is unusable |
|
|
Newbie
Joined: 18 Mar 2011 Posts: 1
|
Hi all,
my Java-App works with MQ Base libraries and reads some messages from the mq. At first, i create a connection to the mq manager like this:
Code: |
Hashtable lMQProps = new Hashtable();
lMQProps.put(MQC.THREAD_AFFINITY_PROPERTY, new Boolean(true));
lMQProps.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES_CLIENT);
int lOpenOptions = MQC.MQOO_INPUT_SHARED;
mQMgr = new MQQueueManager(mCfg.getMQQueueManager(), lMQProps);
mQueue = mQMgr.accessQueue(mCfg.getMQQueueName(), lOpenOptions);
|
Next step is that i read 5000 messages in one transaction:
Code: |
lOptions.waitInterval = mCfg.getMqWaitInterval();
lOptions.options = MQC.MQGMO_WAIT | MQC.MQGMO_SYNCPOINT;
mQueue.get(lMsg,lOptions);
.... ->> loop 5000
mQMgr.commit();
|
After 90'000 messages, an reason code 2195 occurs (actually i don't know what the problem is. i'm looking for a reason...). However, i disconnect from the queue an the manager:
Code: |
mQueue.close();
mQMgr.disconnect();
|
Then i create a new connection in the same way as beginning. But now i cannot get any message, always a reason code 2195 occurs. If i make a restart from my application, everything is okay and i can resume to get messages.
Does anybody know what the problem is? I've read something about the conneciton pool, but in my case i don't use a connection pool. Is there some way to make a "hardreset" of my connection? I think that my connection is "broken" und after every reconnect, i become the same connection...
Thank you for your answers!!!!
Cheers Elmar |
|
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
|
|
|
|