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 » General Discussion » endmqm -w while application is connected

Post new topic  Reply to topic
 endmqm -w while application is connected « View previous topic :: View next topic » 
Author Message
MABeatty1978
PostPosted: Tue Oct 13, 2015 5:43 am    Post subject: endmqm -w while application is connected Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 54

I've got an application that starts up a thread the thread has a queue get with MQGMO = fail if quiescing. If I do a endmqm -w to the qmgr, the thread identifies the mqrc 2161 and returns to the main program. However, it doesn't seem like the qget actually releases as the endmqm -w never ends the qmgr, I have to do a -i to get it to stop.

How do I get that to break so that if the qmgr is shutdown with a -w will actually shut the qmgr down.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 13, 2015 5:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The program needs to actually close the MQCONN when it gets the MQRC.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
MABeatty1978
PostPosted: Tue Oct 13, 2015 6:12 am    Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 54

mqjeff wrote:
The program needs to actually close the MQCONN when it gets the MQRC.


I was closing the MQCONN, or at least I thought I was.

It seems qmgr.close(); doesn't achieve the desired results

but...

qmgr.disconnect(); does.

Any insite as to why? what's the difference between MQQueueManager.close() and MQQueueManager.disconnect();

The documentation isn't very clear:
close

public void close()
throws MQException

Closes the object. No further operations on this object are permitted after it is closed. The behaviour of the close method can be altered by setting closeOptions.

vs....

disconnect

public void disconnect()
throws MQException

Ends the connection to the queue manager. All open queues and processes accessed through this queue manager are closed and become unusable. The only way to reconnect is to create a new MQQueueManager object.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 13, 2015 6:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

close does what it says - it closes THE OBJECT.

That is, it locks the properties and methods of the object so they can't be used again.

That doesn't cause the object to do anything.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Oct 13, 2015 6:27 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

You normally CLOSE an OPEN but DISCONNECT a CONNECT
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
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 » General Discussion » endmqm -w while application is connected
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.