-->
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.  [ 1 post ] 
Author Message
 Post subject: How to load a particular config if there are two in classpat
PostPosted: Mon Jul 04, 2005 2:24 am 
Newbie

Joined: Sun Jul 03, 2005 10:23 pm
Posts: 4
Location: Russia
Dear fellow programmers!

I've tried to find the answer for this question in FAQs and Forum, bud haven't succeed. Probably someone knows the answer and will help me...

Problem details: I have a webapp for tomcat-5.5.9, it includes jar file with hibernate.properties in the root of the classpath. Hence, when hibernate is being configured on tomcat startap, it takes configuration parameters from that file. My objective is to write the test for my hibernate-related code as described in the artical at http://www.theserverside.com/articles/article.tss?l=UnitTesting and I need to use another configuration file (or configure hibernate programmatically) due to some unreproducible values in the original configuration file (like name of the context resource provided in server.xml in tomcat config). But when I create a Configuration instance, it tries to load the first configuration file it finds in the classpath, that is hibernate.properties. How can I load another configuration file while instantiating hibernate Configuration?

I am using Java-1.5.0, hibernate-3.0, tomcat-5.5.9

_________________
Sincerely,
Igor


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.