-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: multiple session factories for multiple databases
PostPosted: Mon Feb 26, 2007 8:00 am 
Beginner
Beginner

Joined: Thu Aug 10, 2006 2:06 am
Posts: 26
hi all,

my application uses multiple databases and as per hibernate i will have to create multiple session factories (as in one session factory for one database).

now do i need to have differnet configuration files for that or can i incorporate multiple <session-factory> elements in the same .cfg.xml file?

Can anybody send me a link where can i get samples for the same?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 6:48 am 
Beginner
Beginner

Joined: Thu Aug 10, 2006 2:06 am
Posts: 26
hi

any pointers to the above issue?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 9:43 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
I think hibernate is only configured to do one SessionFactory per config file. You could easily jury rig it to and put all the configurations in one file though.

check the hibernate apis for all the possible loading methods on the Configuration class

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.