I configured an inbound endpoint, but I want to manage java.naming.provider.url
value in a conf.xml file that under config directory in WSO2.
In each environment I have a conf.xml file which includes the URL values for that environment like:
<environment>
<JNPU>test</JNPU>
</environment>
<test>
<JNPU>failover:tcp://localhost:61616</JNPU>
</test>
I just want first read this environment value of the JNPU which is test in this example. Then, I want to change the java.naming.provider.url
value in inbound endpoint with this value.
In a sequence, I can read the values with using these properties:
<property name="confFile" expression="get-property('registry','conf:endpoints/conf.xml')" scope="default" type="OM" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="JNPUEnvValue" expression="evaluate(fn:concat('$confFile//environment//','JNPU'))" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="JNPUValue" expression="evaluate(fn:concat('$ctx:epConfiguration','//',get-property('JNPUEnvValue'),'//','JNPU'))" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
I used them as parameters in inbound endpoint but I could not get the value of java.naming.provider.url
in conf.xml file.
Thanks for any idea.