• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple datasources with hibernate

 
Bob Green
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a project that uses hibernate to access the database. My project needs to be able to access Oracle and Mssql; I would like to know if anyone has done something like this with hibernate? If so, do you mind to share your knowledge?

Thanks!
Rob
 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume the case is some tables are in one database, some are in other. you may inject different sessionFactory to different DAO, different sessionFactory holds the different database connection information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic