Varun Jain
Varun Jain

Reputation: 507

Wildfly config file runtime parameter

Can we specify environment variable in Wildfly standalone.xml and module.xml file for some runtime configuration? we can do this in tomcat like this, i tried slimier by using JAVA_OPTS in wildly but its not working.

Upvotes: 0

Views: 1367

Answers (1)

Atul
Atul

Reputation: 1556

You can set all the environment variables in standalone.conf.bat(Windows) and standalone.conf(linux) present under WILDFLY_HOME/bin directory.

You can also call them in standalone.xml file using ${env.variable_name}. for example: I have an environment variable DB_CONNECTION_URL and I want to use it in Wildfly. So, I will specify ${env.DB_CONNECTION_URL} for database connection URL in my wildfly configuration file.

Upvotes: 3

Related Questions