[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Environment variables replacement.



Hi,

In Openshift2, you could reference a MySQL DB from a Tomcat cartridge just defining some environment variables, that were replaced automatically in the JNDI definition at the context.xml.
<Resource name="jdbc/piadmin"
url=""
driverClassName="com.mysql.jdbc.Driver"
username="${OPENSHIFT_MYSQL_DB_USERNAME}"
password="${OPENSHIFT_MYSQL_DB_PASSWORD}"
auth="Container"
type="javax.sql.DataSource"
maxActive="20"
maxIdle="5"
maxWait="10000"
/>
In OpenShift3, this doesnt work. The tokens in context.xml are not replaced by their corresponding environment variable values. What is then the correct way to connect a JNDI datasource in a Tomcat S2I like jboss-webserver30-tomcat7-openshift?

Thanks,

Andrés.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]