• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate to deal with many databases ???

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody please tell me how can i configure hibernate so that it can read from many databases ???

I used a list of Configurations and set its properties at runtime, but i keep getting a :



Can anybody tell me how this problem can be solved ?

And please can anybody post a tutorial on dealing with many databases ?

Thanks in advance ...
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a SessionFactory per DataSource. It looks like you have misconfigured at least one of them. Can you post your hibernate.cfg.xml (or simmilar)?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not duplicate post. I had to go through and delete two threads that were identical to this one. If you ever do this, you can always delete the threads yourself, but deleting the first message in the thread.

Mark
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Sorry there was a problem in the connection that was the reason for the multiple posts.

Anyway, Do you mean having multiple <session-factory> tags in my hibernate.cfg.xml file ?

Thanks ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic