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