-->
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: set hibernate.cfg.xml default location
PostPosted: Thu Apr 21, 2005 10:23 pm 
Newbie

Joined: Thu Apr 21, 2005 10:09 pm
Posts: 2
Is it possible to change the default location of hibernate.cfg.xml? I mean by default hibernate looks for the cfg in the classpath or wherever the classloader is located. is it possible to configure to look some where else say "another location" so that when we call Configuration.configure() without parameter, hibernate will goes to "another location" to look for the hibernate.cfg.xml instead of the classloader path.


Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 12:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Sp why don't you just call one of the other configure methods that already allow you to do that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 12:37 am 
Newbie

Joined: Thu Apr 21, 2005 10:09 pm
Posts: 2
The reason why i don't use the other configure is that I'm writing test classes. I need to use a test database therefore I need to use different cfg. The problem is, all my real code use the default hibernate configuration file, so If I need to make the test work with the test database I need to configure hibernate to get the default cfg from the location i want it to.

regards,


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.