• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to multiple databases with Hibernate

 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody have any good examples?
 
Ran Pleasant
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bai Shen wrote:Anybody have any good examples?


Create a DataSource for each database and a Hibernate Session Configuration for each one. Then just get a Hibernate Session object from whichever Session Factory that set over the database you want to interact with.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic