I have a requirement of connecting to 2 DB in one session at a time ...
Detailed explan : In my application when my application starts hibernate is configured to interact with a DB which is meant for my application.I am using Data source for obtaining a connection from this database.
Now in one of my module, I have to connect to another 3rd party DB and execute few stored procedure on it.
Now question is , how do I connect to these two DB in one session at a time
Can I specify 2 data source in my one hibernate.cfg.xml and while initialising session factory I can specify the specific data source....
Any clue please
thanks and regards,
sudhir
|