• Post Reply Bookmark Topic Watch Topic
  • New Topic

Two SessionFactory Objects  RSS feed

 
abheeshek reddy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can we connect to two databases at a time by using Hibernate?

Are you covering this topic in your book?


Thanks
abhee
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You can do it with two SessionFactories. Assuming you know where the dividing line is, your can switch accordingly in you DAO layer.
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cna also have a look at Hibernate Shards that does horizontal partitioning.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!