Expert |
|
Joined: Tue Dec 28, 2004 7:02 am Posts: 573 Location: Toulouse, France
|
Yes, you have to declare two SessionFactory object, one per db. Then just use Sessions from each SessionFactory to execute your queries on each db.
If every queries have to be executed against both db, I'd write a class that executes each query against each db systematically. Pretty simple in fact.
You'll meet maybe some pbs for example if transactions could not be completed on a db although ok on another => Two phase commit ? If you don't want to take care about that, then it should be quick to design.
_________________ Baptiste
PS : please don't forget to give credits below if you found this answer useful :)
|
|