• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple datasources with hibernate  RSS feed

 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!