I am creating a DB pool in server.xml like following
<Resource
name="jdbc/repositoryDS" auth="Container" type="javax.sql.DataSource"
maxActive="20" maxIdle="10" minIdle="2" initialSize="2" maxWait="10000"
testOnBorrow="true" validationQuery="select 1 from dual"
poolPreparedStatements="true"
username="${database.login}" password="${database.password}"
driverClassName="${connection.driver_class}"
url="jdbc:mysql://${database.host}:${database.port}/cms?autoReconnect=true&characterEncoding=utf8" />
All these properties are in my catalina.properties, and everything works fine.
Can we read these from a property from a external file say user home folder (db.propeties) . I tried setting the path in shared.loader= and common.loader= and setting path to my property file but it doesnt seem to work.
Is there any other way or I am missing something?