Hi,
By default Configuration() reads from hibernate.properties. My code actually reads:
new Configuration().configure("/../hibernate.cfg.xml").buildSessionFactory();
everywhere, but recently I've had a bad hibernate.properties file lieing around and it caused major havoc (problems connecting to the datasource, etc) until I tracked it down. I was under the impression that with the above code hibernate.properties would never get used. Can someone please explain how to:
a) prevent hibernate.properties from ever getting used?
b) why the above code still makes use of it?
Thank you,
Gili
|