closeQuiesce

Stopping a queue manager using the closeQuiesce method

This method closes a Queue Manager, specifying a delay to allow existing internal processes to finish normally. Note that this delay is only implemented as a series of 100ms pause and retry cycles. Calling this method prevents any new activity, such as transmitting a message, from being started, but allows activities already in progress to complete. The delay is a suggestion only, and various JVM dependant thread scheduling factors could result in the delay being greater. If the activities currently in progress finish sooner, then the method returns before the expiry of the quiesce duration.

If the queue has not closed at the expiry of this period, it is forced to close.

After this method has been called, no more event notifications will be dispatched to message listeners. It is conceivable that messages may complete their arrival after this method has been called (and before it finishes). Such messages will not be notified. Application programmers should be aware of this, and not assume that every message arrival will generate a message event.
MQeQueueManager qmgr = new MQeQueueManager();  
MQeMsgObject msgObj = null;    
try { 
  qmgr.putMessage(null, "MyQueue", msgObj, null, 0);
}  catch (MQeException e) {// Handle the exception here  
}  
qmgr.closeQuiesce(3000); // close QMgr

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.