| Author |
Two session-factory in one hibernate.cfg.xml
|
himaunshu shah
Greenhorn
Joined: Sep 14, 2004
Posts: 1
|
|
Hi, I want to access two databases. I know this can be achieved by creating two XML configuration files and creating two Configuration and SessionFactory objects in the application. But is it possible to have two session-factoy tags in one hibernate.cfg.xml? If yes, then what should be the format of the cfg.cml and how to access two SessionFactory objects. Thanks in advance.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Have a look at the DTD - only one session-factory element is allowed in a hibernate-configuration. So you'll need two config files.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Two session-factory in one hibernate.cfg.xml
|
|
|