hi all .
I have to set int othe WEB-INF/resources.xml a datasource .
i have deployes tomee into openshift cloud .
But my problem is not a openshift problem.
from openshift i can get the following values from variables environments :
OPENSHIFT_MYSQL_DB_HOST
OPENSHIFT_MYSQL_DB_PORT
OPENSHIFT_MYSQL_DB_USERNAME
OPENSHIFT_MYSQL_DB_PASSWORD
--------
now i would create a system properties at tomee startup or web application
startup for get the properties into my resources.xml (I WOULD SET SYSTEM
PROPERTIES FROM READ THE VARIABLES ENVIRONMENTS THAT I CAN GET FROM
OPENSHIFT.)
I would to set:
mydbmysql.host=$OPENSHIFT_MYSQL_DB_HOST
mydbmysql.port=$OPENSHIFT_MYSQL_DB_PORT
mydbmysql.username=$OPENSHIFT_MYSQL_DB_USERNAME
mydbmysql.password=$OPENSHIFT_MYSQL_DB_PASSWORD
i not know if i have to set into catalina.sh or setenv.bat.
or with JAVA_OPTS=..........
but what is it the syintax correct??
from resources.xml i would declare:
<Resource id="MySQL Database" type="DataSource">
# MySQL example
#
# This connector will not work until you download the driver at:
# http://www.mysql.com/downloads/api-jdbc-stable.html
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://${mydbmysql.host}/test
UserName ${mydbmysql.username}
Password ${mydbmysql.password}
</Resource>
or i can get the values direct from variables environments????????
2) how i can add variables environments at TOMEE startup? a esample for add
a variable ?????
for example : i would add a variable environment named $MYMESSAGE=Hi to all
user of TOMEE
how i can declare for TOMEE ?
tank you very much
Mauro
--
View this message in context:
http://openejb.979440.n4.nabble.com/how-set-system-properties-for-datasource-into-resources-xml-from-variables-environments-tp4664217.html
Sent from the OpenEJB User mailing list archive at Nabble.com.