This content has been marked as final.
Show 2 replies
-
1. Re: Configuring a datasource in Wildfly using environment variables for Docker
jaysensharma Feb 1, 2016 11:30 AM (in response to damaru)WildFly also allows us to use the environment variables as following ${env.DB_CONNECTION_URL} :
<subsystem xmlns="urn:jboss:domain:datasources:4.0"> <datasources> <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"> <connection-url>${env.DB_CONNECTION_URL}</connection-url> <driver>mysql</driver> <security> <user-name>${env.DB_USERNAME}</user-name> <password>${env.DB_PASSWORD}</password> </security>
You can see the following link which explains how we can use it in OpenShift : JBoss EAP Environment Variables | OpenShift Developers You can do it on your local system as well.
Regards
Jay SenSharma
-
2. Re: Configuring a datasource in Wildfly using environment variables for Docker
damaru Feb 2, 2016 2:05 PM (in response to damaru)Wow, that's great, thanks. I tried it and it works.
That will save me a ton of headaches!