Author |
Message
|
rsk33 |
Posted: Wed Mar 23, 2016 12:22 am Post subject: ConfigBrokerProxy issue |
|
|
Centurion
Joined: 21 Aug 2006 Posts: 141
|
Hi,
we are using the configurable service broker Proxy to store the application URLs. when a new service is deployed in existing execution group with a new configurable service entry i am not getting the new value. But when i deployed in newly created execution group i am getting the value. I restarted the execution group but no use. Do i need to refresh the broker-proxy. If so what API i should use. I am using 8.0.0.6 broker and code is as below.Any help is highly appreciated.
Code:
Code: |
private static BrokerProxy b = null;
b = getegproxy();
while(!b.hasBeenPopulatedByBroker()) { Thread.sleep(100); }
ConfigurableService[] UD_set = b.getConfigurableServices("UserDefined");
synchronized static BrokerProxy getegproxy() throws ConfigManagerProxyLoggedException {
if (b == null) {b = BrokerProxy.getLocalInstance();}
return b;
} |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 23, 2016 4:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If memory serves well the configurable services are defined at broker level and cached after startup... So what makes you believe you can define a service and have it available right away?.
Why are you using configurable services for URLs and not bar file overrides or UDP's or a lookup from a DB ???  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rsk33 |
Posted: Wed Mar 23, 2016 9:18 pm Post subject: |
|
|
Centurion
Joined: 21 Aug 2006 Posts: 141
|
Thanks saper for the response.
we have opted over UDP as we replace the entire application configuration file which consist more than 100 entries.
when i change the existing userdefined value with mqsichangeproperties i am getting the new value dynamically without any restart. I believe that there may be way or API call to refresh the cache manually.
Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 24, 2016 4:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
rsk33 wrote: |
Thanks saper for the response.
we have opted over UDP as we replace the entire application configuration file which consist more than 100 entries.
when i change the existing userdefined value with mqsichangeproperties i am getting the new value dynamically without any restart. I believe that there may be way or API call to refresh the cache manually.
Regards |
You're talking here about changing a UDP dynamically, not a configurable property... AFAIK you can change UDP's dynamically but you cannot change configurable values dynamically.
Your comment raises some questions:
Why would you want to change over 100 config values dynamically? What is the business need behind this?
And if you need to do so, should they probably be read (at interval) into shared variables from a DB?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
rsk33 |
Posted: Thu Mar 24, 2016 5:28 am Post subject: |
|
|
Centurion
Joined: 21 Aug 2006 Posts: 141
|
Dear saper,
I am getting the edited configurable value dynamically when changed with mqsichangeproperties command within the message flow. I can paste the results if it is required.
we already running the services in the production with configurable service and it needs a lot of changes to code if we want to go via UDP. so far we have 15 user defined constants. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 24, 2016 5:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As an alternative have you thought about retrieving the configurable properties with the broker proxy from within the flow?
You can then check if this gives you the cached value or the latest value saved with mqsichangeproperties...
I'd still be curious about what the business requirement behind this massive configuration is...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|