-->
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: manage many databses within the same application
PostPosted: Thu Oct 27, 2005 7:15 pm 
Newbie

Joined: Thu Sep 29, 2005 2:32 am
Posts: 8
Hello everybody,
i want to manage many databases in my application. do i have to create many hibernate.cfg.xml or can i load all database informations in one xml file.

regards

Alif


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 7:52 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
you'll need more than sessionFactory, built from the Configuration . The Configuration can be built from hibernate.cfg.xml, or programmatically.

You many want to create two Configurations from the same file, and then programmatically change the connection.datasource property of the second one.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 5:02 pm 
Newbie

Joined: Mon Oct 17, 2005 3:42 pm
Posts: 17
Do you have multiple copies of the same database, or many different databases?

If they're actually physically different, you'll want multiple configurations.

Another consideration is how you'll coordinate transactions accross them - if you're modifying different databases and you need transactional consistency accross them, you'll need to use a JTA datasource, or if the interactions are relatively simple devise heuristics to handle the consistency issues that may crop up.


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.