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 » dynamic queue creation

Post new topic  Reply to topic
 dynamic queue creation « View previous topic :: View next topic » 
Author Message
vandana
PostPosted: Tue Dec 04, 2001 6:32 am    Post subject: Reply with quote

Acolyte

Joined: 01 Dec 2001
Posts: 74

Following is the code that I've written in java.The modelQname is created and existing
as a model queue.I expect the dynamic queue
to be created by the following command.

String modelQName = "ind7_model1";
String dynamQName = "ind7_dynam1";
MQQueue queue = _queueManager.accessQueue(modelQName, openOptions,
null, // default q manager
dynamQName, // no dynamic q name
null ); // no alternate user id

can i access the dynamic queue using the accessqueue method and put messages in it?

What is the use of the dynamic queue?
How do I ensure that it is created?


Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Dec 04, 2001 3:09 pm    Post subject: Reply with quote

Jedi Knight

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

Your code looks correct me. Once you've created the MQQueue object via the accessQueue, you can use any of the methods that are available to you (ie, put and get).

If the accessQueue fails, then your queue didn't get created.

The most common use of dynamic queues that I've seen is for client programs that will be communicating with a server. They need a queue while they are running and can get rid of it when they are done. Dynamic queues are perfect for this.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
vandana
PostPosted: Wed Dec 05, 2001 12:21 am    Post subject: Reply with quote

Acolyte

Joined: 01 Dec 2001
Posts: 74


what could be the possible reason?
when i try to access the dynamic queue again
with the access queue method i get a runtime
error of 2085 which implies unknown_obj_name.

Back to top
View user's profile Send private message
ewan_withers
PostPosted: Wed Dec 05, 2001 4:56 am    Post subject: Reply with quote

Newbie

Joined: 04 Dec 2001
Posts: 3

I think you're getting 2085 on the second access because this is a temporary dynamic queue. This means you create it by accessing a model queue, and it gets deleted once it there are no more applications holding it open.
If you want this queue to persist then change the model queue to make the temporary queues permanent dynamic (PERMDYN). These queues will persist after creation even if there are no applications holding open handles to them.

Hope this helps,

Ewan
Back to top
View user's profile Send private message
vandana
PostPosted: Wed Dec 05, 2001 8:09 pm    Post subject: Reply with quote

Acolyte

Joined: 01 Dec 2001
Posts: 74


but i'm trying to use the dynamic queue in tha same application.i guess a permanent dynamic queue is one which survives a qm crash and a temporary is one which doesn't.
so whether the queue is temp or permanent
i shoukd be allowed to use it in the same application.
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 » dynamic queue creation
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.