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 » MQRC CONNECTION_BROKEN

Post new topic  Reply to topic
 MQRC CONNECTION_BROKEN « View previous topic :: View next topic » 
Author Message
java_ppl
PostPosted: Tue Dec 05, 2006 10:44 am    Post subject: MQRC CONNECTION_BROKEN Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

hi,
I am getting a connection broken error.

I have checked queue.isOpen() and queueManager.isConnected ..and both say that the queue is open and q Manager is connected.

Yet, when I i try to get a message, it gives me broken connection Exception.

......

I have tried to catch the exception and create new queues, and connect to qManager again , in a while loop till the get message succeeds.

But the first time the new objects (queues etc) get created, but again when it tries to get the message, it throws Connection broken exception.
And where I catch the exception , it enters code where I have tried to connect afresh.
Here I get a OBJECT IN USE exception 2042.
-------------

In the catch block,
I have also tried queue.close() and queManger.disconnect() before trying to establish fresh connection.. [Becoz of the Object in use exception ] but here I get an exception sayin : CONNECTION BROKEN

Can anybodyplease help.

Thanks.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Dec 05, 2006 1:01 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

What version of WMQ are you running?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
java_ppl
PostPosted: Tue Dec 12, 2006 5:13 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

Hi ,

we are using

NAME: WebSphere MQ Client for Sun Solaris
VERSION: 5.3.0.5
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 12, 2006 5:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

java_ppl wrote:
VERSION: 5.3.0.5


You might consider applying a more recent CSD...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
java_ppl
PostPosted: Mon Feb 12, 2007 4:08 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

I'm now using WMQ6.0 . And the following code:
public static MQMessage getMessage(

MQQueueManager queueManager,

MQQueue queue,

MQGetMessageOptions gmo) {

File f = new File("/var/gateway/hi/log/hip.ide.int.act.20070212.log");
FileCreator.appendToTextFile(f,"Inside getMessage() Function...\n");

MQMessage message = new MQMessage();

message.messageId = MQC.MQMI_NONE;


boolean flag=true;
while(flag)
{

if(queueManager.isConnected())
{
FileCreator.appendToTextFile(f,"***QManager Connected***\n");
}
else
{
FileCreator.appendToTextFile(f,"***QManager Disconnected***\n");

/*if(queue.isOpen())
{
try {
queue.close();

} catch (MQException e) {
FileCreator.appendToTextFile(f,"Exception occurred 0!!\n"+e+"\n");
}

} */

}

if(queue.isOpen())
{
FileCreator.appendToTextFile(f,"***Queue Connected***\n");


}
else
{
FileCreator.appendToTextFile(f,"***Queue Disconnected***\n");
}
try {


message.messageId = MQC.MQMI_NONE;

message.correlationId = MQC.MQCI_NONE;

queue.get(message, gmo);
flag=false;
FileCreator.appendToTextFile(f,"***GOT THE STATUS MESSAGE !!!***\n");

} catch (MQException e) {

FileCreator.appendToTextFile(f,"Exception occurred 1!!\n"+e+"\n");


//FileCreator.appendToTextFile(f,"***Closing Queue***\n");

try {
//queue.close();
//FileCreator.appendToTextFile(f,"***Closing QM***\n");

FileCreator.appendToTextFile(f,""+Config.getQueueManagerName() + "\n"+ queue.name + "\n");
queueManager.disconnect();
FileCreator.appendToTextFile(f,"***Before createWMQObjects()***\n");
MQController.createWMQObjects(Config.getQueueManagerName(),Config.getQueueName());
FileCreator.appendToTextFile(f,"***After createWMQObjects() ***\n");

}catch(Exception ex)
{
//ex.printStackTrace();
FileCreator.appendToTextFile(f,"Exception occurred 2!!\n"+ex + "\n");
//throw new GatewayException(ex);
}


}

}

return message;
}




The output logged to the filel looks like this:

Inside getMessage() Function...
***QManager Connected***
***Queue Connected***
Exception occurred 1!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
BMTSEM1
MFM.HUB.EQ_TRD.WBI.HIP.ST
***Before createWMQObjects()***
***After createWMQObjects() ***
***QManager Disconnected***
***Queue Connected***
Exception occurred 1!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
BMTSEM1
MFM.HUB.EQ_TRD.WBI.HIP.ST
***Before createWMQObjects()***
Exception occurred 2!!
com.morleyfm.eai.common.GatewayException: Error when creating WMQ Queue: MFM.HUB.EQ_TRD.WBI.HIP.ST
***QManager Disconnected***
***Queue Connected***
Exception occurred 1!!


and so on....................

I dont understand If Queue Manager and Queue are connected how it throws the disconnected exception (2009).

Any idea?

Thanks,
jp
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQRC CONNECTION_BROKEN
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.