Hi AG,

That looks good.

Now I can set my properties file
${MY_APP_HOME}/conf/apache-ignite.properties accordingly for the production
cluster and failover cluser:
* Production
nodeIpAddresses=10.22.3.30,10.22.3.31,10.22.3.32,10.22.3.33

* Failover
nodeIpAddresses=10.22.4.30,10.22.4.31,10.22.4.32,10.22.4.33

Then use the property in the Ignite configuration file:

<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location">
        <value>file:${MY_APP_HOME}/conf/apache-ignite.properties</value>
    </property>
</bean>

<bean class="org.springframework.util.StringUtils"
factory-method="commaDelimitedListToSet">
    <constructor-arg type="java.lang.String" value="${nodeIpAddresses}"/>
</bean>

Note: MY_APP_HOME is an environmental variable.

Cheers,
Yuci




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/How-to-pass-variable-to-the-configuration-file-tp9402p9433.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to