Oct 31st, 2008, 08:30 AM
I'm using Hibernate version 2 and creating configuration object in following way:
Configuration cfg = new Configuration.configure("my-hibernate.cfg.xml");
Whole hibernate part is packed in one jar called "my.jar".
This jar file goes than as one of the app library which is packed as "my.ear" file. Now this hibernate jar will be used by some other Spring based module and I have to override some of the hibernate properties like "dialect" property from "my-hibernate.cfg.xml" file for each ear that I craete.
Is there any way to override hibernate configuration properties using Spring when SessionFactory and Configuration of Hibernate is not managed by Spring? Maybe there is some way to externalize hibernate configuration to be placed outside of this "my.jar" file?
Nov 3rd, 2008, 06:47 AM
Tags for this Thread