Author |
Message
|
venkat_chekka |
Posted: Thu Aug 04, 2011 12:35 pm Post subject: Shared Variable value if Broker execution group crash |
|
|
Apprentice
Joined: 14 Apr 2006 Posts: 37
|
Hi,
I want to know that Shared Variable value will available even if after Broker execution group crash or Broker down.
Thanks in Advance,
Venkat Chekka. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 04, 2011 12:42 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What happens when you try it?
What value does it have when Broker first starts up? How does it get that value? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 04, 2011 12:42 pm Post subject: Re: Shared Variable value if Broker execution group crash |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
venkat_chekka wrote: |
I want to know that Shared Variable value will available even if after Broker execution group crash or Broker down. |
Of course they won't be. No variable in any language I'm aware of survives the closing or crashing of the application. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 05, 2011 4:28 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
venkat_chekka |
Posted: Fri Aug 05, 2011 4:37 am Post subject: |
|
|
Apprentice
Joined: 14 Apr 2006 Posts: 37
|
I am asking that is it available after Broker execution group started again. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 05, 2011 4:38 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 05, 2011 4:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
To be more direct, no. |
To be more correct, the shared variable is indeed *available* after the Broker or EG restarts.
The *value* that it holds will almost certainly be different than the value it held before the restart, however. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 05, 2011 7:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What you are looking for is a shared variable read from a DB and each update needs to get written to the DB.
In case of a crash the latest value would be read from the DB to initialize the shared variable...
Have fun changing your design...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|