Wildfly variable properties -
standalone.bat
set "dbo_path=d:\test"
standalone.xml
<subsystem xmlns="urn:jboss:domain:naming:2.0"> <bindings> <simple name="java:propertiesfilename" value="${dbo_path}/test.properties"/> </bindings> <remote-naming/> </subsystem>
how set properties wildfly picks them ??
how use relative path in value standalone.xml
you there. in order achieve goal, need following:
set environment variable
set "foo=bar"
then change standalone.xml contain reference ${env.foo}:
<simple name="java:/foo" value="${env.foo}/test.properties"/>
.you can check if solution working running following java ee 6+ code
@singleton @startup public class startupbean { @resource(lookup="java:/foo") string foo; @postconstruct public void start() { system.out.println("java:/foo = " + foo); } }
please refer http://www.mastertheboss.com/jboss-server/jboss-configuration/how-to-use-environment-variables-in-standalone-xml-or-host-xml possible solution.
Comments
Post a Comment