ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Configurable Services

Post new topic  Reply to topic
 Configurable Services « View previous topic :: View next topic » 
Author Message
kunal07
PostPosted: Thu Feb 06, 2014 6:11 am    Post subject: Configurable Services Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

Hi,

My requirement is to create the user defined configurable service and pass certain values ex: HTTP URL etc to run it dynamically.
can anyone tell how to implement this requirement.

Currently i am creating one UDP and try to access it from the JCN .

please provide the better approach to do the same
Back to top
View user's profile Send private message
codemonkey85
PostPosted: Thu Feb 06, 2014 7:06 am    Post subject: Reply with quote

Novice

Joined: 06 Feb 2014
Posts: 11
Location: UK

Hi,

Here is some java that worked for me -

Code:
BrokerProxy b = BrokerProxy.getLocalInstance();
         
         // To ensure that the BrokerProxy object has been populated with data from the broker
         // before we access the configurable service, Add the following code:
           
         while(!b.hasBeenPopulatedByBroker()) {Thread.sleep(100); }
                        
         //As we have defined the configurable service with type 'UserDefined'; Add following code:
          
         ConfigurableService CS_set = b.getConfigurableService("UserDefined", "MyConfigService");
         
          
         String age = CS_set.getProperties().getProperty("MyAge");



Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 06, 2014 7:07 am    Post subject: Re: Configurable Services Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

kunal07 wrote:
Hi,

My requirement is to create the user defined configurable service and pass certain values ex: HTTP URL etc to run it dynamically.
can anyone tell how to implement this requirement.

Currently i am creating one UDP and try to access it from the JCN .

please provide the better approach to do the same

How dynamic is this value?
Would mqsiapplybaroverride do?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
codemonkey85
PostPosted: Thu Feb 06, 2014 7:09 am    Post subject: Reply with quote

Novice

Joined: 06 Feb 2014
Posts: 11
Location: UK

Hi,

Would you not be better off storing the URL's in a table and accessing them from there?
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Feb 06, 2014 7:24 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Once again - this is NOT a requirement - it is an option for meeting a requirement.

State the underlying functional requirement first. Then choose the best solution.

Read the infocenter. Only then ask for coding hints if stuck.

That's what I would do.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Feb 06, 2014 7:35 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

BrokerProxy b = BrokerProxy.getLocalInstance();

// To ensure that the BrokerProxy object has been populated with
// data from the broker before we access the configurable

while (!b.hasBeenPopulatedByBroker()) {
Thread.sleep(100); }

// As we have defined the configurable service with type
// 'UserDefined'; Add following code:

configurationSrvArr = b.getConfigurableServices("UserDefined");


i am using this code and values get stored im configurationSrvArr.
but not able to use .
can anyone tell how to use these values now? as there is not straight forward way to access the objects .
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 06, 2014 7:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's almost as if you want us to give you free code and free training.

Surely you're much too professional to ask for that?
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Feb 06, 2014 7:47 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

working now for me.

thanks all
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Configurable Services
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.