Author |
Message
|
Reeti |
Posted: Mon Mar 31, 2003 11:53 pm Post subject: Opening a queue |
|
|
Apprentice
Joined: 11 Jul 2002 Posts: 40
|
Hi:
I would like to open a queue with lock. so that no other program can open the queue with input or output mode. How shld I achieve this?
Pls. let me know.. this is urgent.
Best regards
Reeti |
|
Back to top |
|
 |
jhalstead |
Posted: Tue Apr 01, 2003 12:55 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
Off top of my head I believe the MQOO_INPUT_EXCLUSIVE option needs to be set in the Open options. This stops any other apps getting while you have it open.
As for an exclusive put, Idon't think that is an option. Why do you need this? Could you control this through your application?
Goto Documentation->AP Guide or AP Reference up above on this sites menu bar to double check - I would however I'm on a sloooooooooow dial up!
Thanks
Jamie |
|
Back to top |
|
 |
Reeti |
Posted: Tue Apr 01, 2003 1:03 am Post subject: |
|
|
Apprentice
Joined: 11 Jul 2002 Posts: 40
|
When I set the mode as MQOO_INPUT_EXCLUSIVE then can't open the queue handle in the input from other application. But I can open it for the OUTPUT mode. This does not suffices my purpose. I would like to lock the queue.
Pls. help.
Thanks
Reeti |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 01, 2003 6:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What are you trying to do, that breaking the asynchronous nature of MQSeries (and the abstraction of sending apps from receiving apps) would help?
It is possible to do what you want, if through no other means than using PCF messages to put disable the queue, and then reeanble it for putting. |
|
Back to top |
|
 |
tillywern |
Posted: Tue Apr 01, 2003 12:14 pm Post subject: HELLO??? |
|
|
 Centurion
Joined: 28 Jan 2003 Posts: 109 Location: Colorado
|
There is only a certain level of granularity that MQ allows for I/O actions... Locking the queue is not a valid option.. Either you open it exclusivly to read from it or you share it with the world to read.. You can't tell MQ that you want to be the only process reading from the queue except for process X. Choose one or the other because you can't have both.
Get or Put disabeling the queue probably isn't going to do what you want either because it does essentially what you are doing by setting EXCLUSIVE read or write.
A broader idea of why you can't control who is accessing your queue would be helpful. It sounds like an application architecture probelm more than an technical problem. |
|
Back to top |
|
 |
|