|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
dynamic queue creation |
« View previous topic :: View next topic » |
Author |
Message
|
vandana |
Posted: Tue Dec 04, 2001 6:32 am Post subject: |
|
|
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 |
|
 |
bower5932 |
Posted: Tue Dec 04, 2001 3:09 pm Post subject: |
|
|
 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 |
|
 |
vandana |
Posted: Wed Dec 05, 2001 12:21 am Post subject: |
|
|
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 |
|
 |
ewan_withers |
Posted: Wed Dec 05, 2001 4:56 am Post subject: |
|
|
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 |
|
 |
vandana |
Posted: Wed Dec 05, 2001 8:09 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|