Author |
Message
|
Senthamizh |
Posted: Tue Jan 19, 2010 9:00 pm Post subject: Object is in use |
|
|
Apprentice
Joined: 21 Dec 2009 Posts: 47
|
Hi
I have a MQ based (MQ Input and MQ Output) flow deployed and running in broker. The output queue is an alias queue(Test_Out), pointing to a local queue(Test_App1_Out).
I have an requirement to change the base queue of the alias queue to some other local queue(Test_App2_Out).
Since the flow is running, the OpenInputCount of the local queue is "1", and i get "Object is in use" error when i used the following commands.
1) DEFINE QALIAS(Test_Out) TARGQ(Test_App2_Out) REPLACE
2) ALTER QALIAS(Test_Out) TARGQ(Test_App2_Out)
Even if i stop the flow, the OpenInputCount is not changing to "0".
I also tried using ALTER QALIAS(Test_Out) TARGQ(Test_App2_Out) FORCE.
It got changed succesfully, but while testing, i got an error MQRC 2041, saying "not able to write to queue" as the object definition is changed."
Can anyone let me know, When will the flow actually release the handle from the queue making the OpenInputCount as 0? |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 19, 2010 11:12 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The way i'd do it would be:-
1) Delete the flow
2) Apply the WMQ Changes with a script!
3) Check that everything was ok
4) Re-deploy the flow
5) ***** Important ****** Check the logs for errors with the flow not being able to open the input Queue. If error, correct your script and repeat from step 1.
You would be surprised how many times that I've seen the last step omitted and then you get complaints that it is no longer working. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Senthamizh |
Posted: Wed Jan 20, 2010 1:16 am Post subject: |
|
|
Apprentice
Joined: 21 Dec 2009 Posts: 47
|
Hi, Thanks for the reply,
But is there any way of achieving this without removing the flow? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 20, 2010 4:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Senthamizh wrote: |
But is there any way of achieving this without removing the flow? |
The only alternative is to stop it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Senthamizh |
Posted: Wed Jan 20, 2010 5:42 am Post subject: |
|
|
Apprentice
Joined: 21 Dec 2009 Posts: 47
|
I tried, but the handle to the Queue is not released when the flow is stopped. The openinputcount still remains as 1.
The openinputcount is changed to '0', only when the flow is removed. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 20, 2010 5:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have failed to specify what version of broker you are using.
The behavior of the MQInput node when it is part of a stopped flow is different (i.e. *better*) in newer versions of Broker. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jan 20, 2010 8:04 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
You could always stop the Broker. Make the canges and restart. That way you don't have to remove the flow.
If the Input Handle is not getting released after stopping the flow then killing the EG prosess (aka DataFlowEngine) will also release it. This is a pretty drastic measure though.
Out of interest, exactly why don't you want to re-deploy the flow? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jan 20, 2010 11:21 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Another option in older Brokers (where stopping the flow doesn't stop it ) is to mqsireload the execution group that has the flow whose queue you force changed. That's sometimes better than restarting the whole Broker. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Senthamizh |
Posted: Thu Jan 21, 2010 8:41 pm Post subject: |
|
|
Apprentice
Joined: 21 Dec 2009 Posts: 47
|
Yes, a restart of the execution group after using the force option worked fine.
I use broker version 5.3
@ smdavies - The change is not done in one flow, there are quite some flows in which change has to be made, hence redeploying the flow wouldn't be a good option. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jan 22, 2010 5:02 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Senthamizh wrote: |
I use broker version 5.3
|
No such animal. Maybe you using MQ 5.3, but there was never a Broker 5.3. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jan 22, 2010 5:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
PeterPotkay wrote: |
Senthamizh wrote: |
I use broker version 5.3
|
No such animal. Maybe you using MQ 5.3, but there was never a Broker 5.3. |
And even if there was, it would be out of support. And also "older" and therefore "worse". |
|
Back to top |
|
 |
|