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 » Closing Queue handles

Post new topic  Reply to topic
 Closing Queue handles « View previous topic :: View next topic » 
Author Message
nanotech
PostPosted: Wed Apr 18, 2012 1:10 pm    Post subject: Closing Queue handles Reply with quote

Novice

Joined: 29 May 2009
Posts: 15

Hi All,

We have a scenario where multiple queue Alias point to one physical queue. Our Message Flows (Websphere Message Broker,message flows ) write to these alias queues and another client application (written in Java) reads off that queue.

So the requirement is to delete the queue alias if it is no longer needed without bouncing queue manager.

I am trying to delete the queue using PCF commands but when I do that I get MQRC 4004 (MQRCCF_OBJECT_OPEN). So I check through MQ explorer and see that there are two open handles to those queues, one held by client application and one by our DataflowEngine.

I attempted to close the queue (using Java Code ) MQQueue.close() but it had no effect.

Question is:

1. Is attempting to close the the queue the right approach ? If yes, how can I make sure that queue alias that I am interested in gets closed and other alias does not get affected ?

2. If closing the queue is not correct approach, then is it possible to delete those handles by using the queue alias name ( by either using MQ Java API or PCF commands ) , without affecting other queue alias which point to the same physical queue.

Thanks,
RG
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 18, 2012 3:47 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

your statement says delete if no longer needed.... Well as long as you have a handle on it (ipprocs, opprocs), the queue is needed. And you won't drop the handle without restarting the message flow... (DataFlowEngine)

So what are you really trying to do? Kill the queue from under the application?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
nanotech
PostPosted: Wed Apr 18, 2012 4:44 pm    Post subject: Reply with quote

Novice

Joined: 29 May 2009
Posts: 15

According to our design, we have multiple queue alias (one per user) and one common queue . I would like to delete the Alias queue if that user is no longer active, without affecting the other users and without bringing the system down ( if possible )
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 18, 2012 5:31 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's some documentation on when Broker will close open queue handles.

it may not be possible for broker to determine that a given 'user' is no longer active, and thus decide that it can close it's open handle on the relevant queue alias.
Back to top
View user's profile Send private message
nanotech
PostPosted: Wed Apr 18, 2012 6:03 pm    Post subject: Reply with quote

Novice

Joined: 29 May 2009
Posts: 15

Can you pls. point me to that documentation regarding open handles ?

Is it possible to close open handle using MQ Java API or some other API ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 19, 2012 7:45 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

pcf command stopping the corresponding connection... but this might harm the broker.

What you really want to do is have the broker put the message to the common queue and have the client retrieve it using the alias...

Have fun
_________________
MQ & Broker admin
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 » Closing Queue handles
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.