Author |
Message
|
kun.leeing |
Posted: Tue Mar 31, 2009 4:50 pm Post subject: Restart channel using pcf by force |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Hi, everybody.
How can I restart my channels using pcf code by force ignoring connections of clients on the channel when the channel occurs problems?
thanks.  |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Mar 31, 2009 6:02 pm Post subject: Re: Restart channel using pcf by force |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
kun.leeing wrote: |
Hi, everybody.
How can I restart my channels using pcf code by force ignoring connections of clients on the channel when the channel occurs problems?
thanks.  |
There are no PCF / MQSC commands to start or restart a svrconn channel. They only way that an instance of a svrconn channel can start is if a Client initiates a new connection via it.
What sort of problems are you referring to? _________________ Glenn |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue Mar 31, 2009 7:45 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
when connections by clients overload on one channel if we can recover the channel by restarting channel?
I know the connection can not be restarted when some processes connected to it.
So , I wonder if I can restart the channel by force regardless of the clients on it?
If I use PCF programming , how can I do it? |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Apr 01, 2009 5:18 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Stopping the svrconn channel will force disconnection of the Clients that are currently using it. You can stop certain connections, using CONNAME parameter. You can stop to statuses of INACTIVE (allow more conns straight away) or STOPPED (dont allow anyone to connect).
From a STOPPED status, you can then start the channel, and it will then allow new connections to occur (seen as instances of the channel in RUNNING status).
There is also a MODE parameter that determines how connected apps are treated. See the manual!
Is this what you meant by "restart" ? _________________ Glenn |
|
Back to top |
|
 |
kun.leeing |
Posted: Thu Apr 02, 2009 7:01 am Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks for your reply,Glenn.
I want to restart channels by sending pcf message and channels will kick out the connections of clients in time when it got problems like connection overload.
Now I 'm using pcf code to stop it, but the channel will halt for a while waiting client's connections released. |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Apr 02, 2009 4:34 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
kun.leeing wrote: |
Thanks for your reply,Glenn.
I want to restart channels by sending pcf message and channels will kick out the connections of clients in time when it got problems like connection overload.
Now I 'm using pcf code to stop it, but the channel will halt for a while waiting client's connections released. |
What do you mean by connection overload?
After stopping the channel, the client conns will be soon be released. Its then up to code in the client app to detect that it has been kicked out (eg. 2009 errors on any MQI calls) and then reconnect to MQ, reopen its queues and continue processing. It may also involve doing recovery and consistency checking of the state of the app and its processing. You can't force the reconnect to happen using MQ commands. _________________ Glenn |
|
Back to top |
|
 |
kun.leeing |
Posted: Mon Apr 06, 2009 12:20 am Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks,Glenn.
Quote: |
After stopping the channel, the client conns will be soon be released. |
Yes, I know.
But can not stop the channel immediately, if there's proccess on it. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 06, 2009 12:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
But can not stop the channel immediately, if there's proccess on it. |
Yes you can. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kun.leeing |
Posted: Mon Apr 06, 2009 12:35 am Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
I try to stop it by sending channel 'STOP' pcf message but it will hold a while.
Do you mean by sending pcf message? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 06, 2009 1:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
I try to stop it by sending channel 'STOP' pcf message but it will hold a while. |
Of course it will. Unless you tell it different.
kun.leeing wrote: |
Do you mean by sending pcf message? |
Why would this help? It's the same command. All the runmqsc command is doing under the covers is issuing PCF commands for you (regular and purist posters work with me here ok?).
Try telling the stop command not to hold for a while, as described here
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Apr 06, 2009 5:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
(regular and purist posters work with me here ok?). |
pedantic explanation avoided. |
|
Back to top |
|
 |
kun.leeing |
Posted: Mon Apr 06, 2009 5:19 am Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks,vitor.
I've read the guide and got how to use 'force stop' and terminate the thread and process properly.
 |
|
Back to top |
|
 |
|