|
I have used Hibernate with two databases. You just need to make two datasources then call the one you need for the specific query. I have most recently been using hibernate with Spring but I looked up some old code and what I did was made two different SessionFactories, and so I would call either one or the other session from the factory.
session = DBUtil.getABCSession();
or
session = DBUtil.getDEFSession();
|