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 » MQJE016: MQ queue manager closed channel immediately .......

Post new topic  Reply to topic
 MQJE016: MQ queue manager closed channel immediately ....... « View previous topic :: View next topic » 
Author Message
MQAjay
PostPosted: Sat Aug 03, 2002 8:02 am    Post subject: MQJE016: MQ queue manager closed channel immediately ....... Reply with quote

Newbie

Joined: 03 Aug 2002
Posts: 2

Hi All,
I'm trying to communicate between two queuemanagers which are in same machine,I'm able to see the message in local queue of the remotemanger,as i try to get the msg from receiver application.I get the error .here is the receiver application code and error msg.


import com.ibm.mq.* ;

public class PtpReceiver {
public static void main(String args[]) {
try
{
String hostName = "J3M8D2" ;
String channel = "MQREMOTECH" ;//server connection channel
String qManager = "MQQMREMOTE" ;
String qName = "MQQREMOTE" ;
//Set up the MQEnvironment properties for Client Connections
MQEnvironment.hostname = hostName ;
MQEnvironment.channel = channel ;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);
//Connection To the Queue Manager

MQQueueManager qMgr = new MQQueueManager(qManager) ;
/* Set up the open options to open the queue for out put and
additionally we have set the option to fail if the queue manager is quiescing.
*/
int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING ;
//Open the queue
MQQueue queue = qMgr.accessQueue(qName,openOptions,qManager,null,null);
// Set the put message options.
MQGetMessageOptions gmo = new MQGetMessageOptions();

gmo.options = gmo.options + MQC.MQGMO_SYNCPOINT ; //Get messages unde syncpoint control
gmo.options = gmo.options + MQC.MQGMO_WAIT ; // Wait if no messages on theQueue
gmo.options = gmo.options + MQC.MQGMO_FAIL_IF_QUIESCING ; // Fail if QeueManager Quiescing
gmo.waitInterval = 3000 ; // Sets the time limit for the wait.
/* Next we Build a message The MQMessage class encapsulates the data buffer
that contains the actual message data, together with all the MQMD parameters
that describe the message.
*/
MQMessage inMsg = new MQMessage(); //Create the message buffer
// Get the message from the queue on to the message buffer.
queue.get(inMsg, gmo) ;
// Read the User data from the message.
String msgString = inMsg.readString(inMsg.getMessageLength());
System.out.println(" The Message from the Queue is : " + msgString);
//Commit the transaction.
qMgr.commit();
// Close the the Queue and Queue manager objects.
queue.close();

qMgr.disconnect();
}
catch (MQException ex)
{
System.out.println("An MQ Error Occurred: Completion Code is :\t" +
ex.completionCode + "\n\n The Reason Code is :\t" + ex.reasonCode );
ex.printStackTrace();
}
catch(Exception e) {
e.printStackTrace();
}
}
}

MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: Completion Code 2, Reason 2009
An MQ Error Occurred: Completion Code is : 2

The Reason Code is : 2009
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
171)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnecti
on(MQClientManagedConnectionFactoryJ11.java:228)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnectio
n(MQClientManagedConnectionFactoryJ11.java:245)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:666)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:615)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:392)
at PtpReceiver.main(PtpReceiver.java:20)



I appreciate your help/suggestions in regards to fix these errors

regards
_________________
Ajay
Back to top
View user's profile Send private message
amar
PostPosted: Sun Aug 04, 2002 12:59 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 45

Hi,
I need some more information regarding your Question..

a). which platform you are running this program?

b). if it is Clientmachine you change the
MQEnvironment.properties.put("transport", "MQSeries Client") like..

amar
Back to top
View user's profile Send private message
MQAjay
PostPosted: Mon Aug 05, 2002 5:09 am    Post subject: Reply with quote

Newbie

Joined: 03 Aug 2002
Posts: 2

Hi All,

Thanks for reply,Its MQSeries server 5.2 running on Windows 2000 platform.Appliaction and QueueManager running on same machine.

thanks for ur time
_________________
Ajay
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 » MQJE016: MQ queue manager closed channel immediately .......
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.