In our struts2 webapplication we are using Hibernate ORM for DB communication. We configured all the connection properties in the default hibernate.cfg.xml file. The connection properties changes from environment to environement i.e., they are different in Local dev system, beta, staging & on live.
Recently i have added quartz.properties files so that the scheduled jobs details are stored in the DB. I am providing the DB properties again in quartz.properties like
Code:
#quartz table prefixes in the database
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.isClustered = false
#The details of the datasource specified previously
org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/gsraisin
org.quartz.dataSource.myDS.user = root
org.quartz.dataSource.myDS.password = rootAdmin
org.quartz.dataSource.myDS.maxConnections = 20
Is there way that i can use the properties in a single location, i.e, if possible in hibernte.cfg.xml and then use the same details for Quartz app. Please suggest me accordingly.