ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » get() method on queue block in case of lost connection

Post new topic  Reply to topic
 get() method on queue block in case of lost connection « View previous topic :: View next topic » 
Author Message
vonasek
PostPosted: Wed Mar 20, 2002 11:28 am    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2002
Posts: 2
Location: Czech Republic

Hi,
after some tests of MQ base Java it seems to us MQQueue.get() method blocks indefinitly if a connection to MQ-Series server gets lost during wait period of the method.
What we do is we run a thread pooling for messages using get() method with timeout of 5 seconds (MQC.MQGMO_WAIT used). Another thread puts messages, both having own queue manager to run in paralel. Simulation of network problems between such a client and MQ-Series is done simply by unplugging network cable.
When the cable is unplugged we would expect one of followings:
- an exception received more less immediatelly at connection break
- an exception received at timeout of get() (different than "NO_MESSAGE_AVAILABLE", code 2033)

Unfortunatelly none of these happens and get() remains blocked. This causes reasonable problems since there's no chance to kill such a thread in Java.

My concern is if anybody had/has a similar problem and would bring some ideas how to avoid this. Thanks.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrlinux
PostPosted: Wed Mar 20, 2002 12:26 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Are you using MQ Server to Server Connection or MQClient to server.

If you are using MQ Server to MQServer your application will never see this
issue, This will be taken care of by the channel code.

If you are using MQClient to MQServer you should be able to use the HBINT on
the channel definition to prevent this issue.

_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
StefanSievert
PostPosted: Wed Mar 20, 2002 1:35 pm    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

Hi,
please have a look at my recent findings. It is not the exact same scenario, but perhaps it applies as well: http://www.mqseries.net/phpBB/viewtopic.php?topic=2076&forum=12&1
HTH,
Stefan

_________________
Stefan Sievert
IBM Certified * WebSphere MQ
Back to top
View user's profile Send private message
vonasek
PostPosted: Mon Mar 25, 2002 1:20 am    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2002
Posts: 2
Location: Czech Republic

OK, thanks very much for that hint with HBINT - that's it.
It looks good when HBINT decreased.
Thanks.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
abiram8
PostPosted: Fri Mar 29, 2002 3:42 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 207
Location: India

Try out MQC.MQGMO_WAIT_UNLIMITED options

Refer manual for correct Syntax

GoodLuck
R.Abiram
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » get() method on queue block in case of lost connection
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.