-->
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.  [ 2 posts ] 
Author Message
 Post subject: Connect more than one database
PostPosted: Thu Jun 29, 2006 9:29 am 
Newbie

Joined: Thu Jun 29, 2006 9:19 am
Posts: 1
Hi everybody,
in my project I've to connect 4 databases, each one using a different instance of Informix.

It is possible to do this with Hibernate?
What do I do to have the connection?
In that way I've to change hibernate.cfg.xml ?

Excuse me for my poor english anh Thanks for the help !!!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 29, 2006 10:53 am 
Newbie

Joined: Tue Jun 29, 2004 10:14 am
Posts: 11
You need to create a SessionFactory for each database.

HibernateUtil can be refactored reasonably easily to support multiple session factories. Just use a flag passed to getSession() to indicate which database you want to work with.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.