Author |
Message
|
logonaniket |
Posted: Wed Jul 22, 2015 11:48 am Post subject: Declare JNDIBinding of JMS Output Node Dynamically |
|
|
Novice
Joined: 12 Dec 2013 Posts: 17
|
Hi Guys
Is there any way to declare "Location JNDI Bindings" properties of JMSOutput Node dynamically via ESQL?
My Flow is as follows:
MQInput -> Compute -> JMSOutput
I tried searching everywhere but I couldn't find a statement to declare this.
Any help? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 22, 2015 12:06 pm Post subject: Re: Declare JNDIBinding of JMS Output Node Dynamically |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
logonaniket wrote: |
I tried searching everywhere but I couldn't find a statement to declare this. |
I doubt there's an ESQL statement to do this.
If my reading of what DestinationData means here is correct then you can probably achieve what you need with an ESQL SET statement.
It certainly has the words "Location JNDI Bindings" in it.
That's how I found it - by typing "Location JNDI Bindings" into the InfoCenter search. I'm not even sure what they are....
But that's how you dynamically set things in other types of node. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 22, 2015 12:41 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well you'll need to be a lot more specific about what you're trying to do.
Typically the JNDI bindings location can be set either at deployment time (bar file override, configurable services) or possibly through a policy?
What would make you want to change dynamically the queue manager you're connected to? Define all your destinations for the same flow in the same qmgr / qmgr network and allow MQ routing to deliver if the destination is not in the qmgr you are connected to...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
logonaniket |
Posted: Thu Jul 23, 2015 5:56 am Post subject: |
|
|
Novice
Joined: 12 Dec 2013 Posts: 17
|
@Vitor Location JNDI Bindings is related to JMS where we specify the IP Address of the JMS Server.
Scenario where I want to use this:
We have been given a task to fetch the IP address dynamically from Database and if pass the value as t3://192.168.1.2:60001,192.168.1.3:60001,192.168.1.4:60001
So.. if 192.168.1.2 is down, message will be sent to 192.168.1.3 and if 2nd server is also down it will be sent to 192.168.1.4
But these guys want to keep this dynamic so that they can change/increase the values at runtime.
@fjb_saper I know we can do this via property override but that's not I want to do over here.  |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jul 23, 2015 5:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have your answer.
Except that's not a valid format for Location JNDI bindings, unless I'm completely wrong. |
|
Back to top |
|
 |
logonaniket |
Posted: Thu Jul 23, 2015 6:06 am Post subject: |
|
|
Novice
Joined: 12 Dec 2013 Posts: 17
|
mqjeff wrote: |
You have your answer.
Except that's not a valid format for Location JNDI bindings, unless I'm completely wrong. |
Hey Jeff, It's correct. It works if we provide in the JMSOutput Node properties. Just want to do the same in ESQL. (Don't worry about the address.. this is how it works at our end )
There is something like this for JMS Receive node though (but doesn't work for JMSOutput node):
SET Environment.Variables.JNDI = 't3://192.168.1.2:60001,192.168.1.3:60001,192.168.1.4:60001';
SET OutputLocalEnvironment.JMS.Output.JNDIBindingLocation = Environment.Variables.JNDI; |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 24, 2015 5:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Again, what you are giving us is not a JNDI location, it is a provider URL.
What is JNDI InitialContextFactory class to go with this?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jul 24, 2015 6:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
|