-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Configure environment specific stuff outside of application
PostPosted: Tue Dec 11, 2007 10:32 am 
Newbie

Joined: Mon Dec 03, 2007 9:53 am
Posts: 12
We're using Hibernate 3.2.5 in JBoss 4.0.2. In development we use PostgreSQL, but in production we're goin to use DB2. Hibernate is initialized through the Hibernate jmx bean (in a .sar file included in the application).

As the dialect depends on the target environment (postgreSQL or DB2), I'd like to keep this condiguration outside of the application (.ear file) as I would like to use the same archive for all environments. As of now I configure the dialect in the jboss-service.xml, which is part of the application (as the .sar file is part of the application).

How could I solve this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 3:48 am 
Newbie

Joined: Mon Dec 03, 2007 9:53 am
Posts: 12
After some investigation (browsing the code) it looks like it would be possible to leave some configuration out of the jboss-service.xml and define it in hibernate.properties instead.
My thinking is that it would be possible to keep the hibernate.properties file outside of the application and thereby keeping some config outside of the application.

I've tried to put the hibernate.properties in [jboss_root]\server\default\lib, but it isn't being picked up. According to the code, Hibernate tries to read /hibernate.properties and I though that the lib folder was in the class path.
Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 4:26 am 
Newbie

Joined: Mon Dec 03, 2007 9:53 am
Posts: 12
Solved it by putting the hibernate.properties file in [jboss_root]\server\default\conf .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.