Beginner |
|
Joined: Fri Apr 13, 2007 9:27 am Posts: 33
|
Hello all:
How can I configer the session factory to use more than one config file?
I have two modules that uses Hibernate. Each module has its own config file. The two module works fine independent from each other. I want to combine to use the two module in a project.
I created a jar file for each module and dropped them in the project class path. It doesn't work, because the session factory load one config file only.
my SessionFactory class use looks like that:
sessionFactory = new Configuration().configure.buildSessionFactory();
I modified to look like that:
sessionFactory = new Configuration().addJar(new File("First.jar")).addJar(new File ("Second.jar")).buildSessionFactory();
and still doesn't work.
Any help is greatly appreciated.
|
|