Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: DB properties in multiple configuration files
PostPosted: Fri Jun 29, 2012 3:24 am 

Joined: Fri Jun 29, 2012 3:21 am
Posts: 3
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

#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.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.