-->
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: interactiong to multiple databases
PostPosted: Wed Aug 10, 2011 11:30 pm 
Newbie

Joined: Wed Aug 10, 2011 11:24 pm
Posts: 14
How to communicate with multiple databases in hibernate?

_________________
With Best Regards
SreenivaS
Save trees Save life


Top
 Profile  
 
 Post subject: Re: interactiong to multiple databases
PostPosted: Wed Aug 10, 2011 11:51 pm 
Newbie

Joined: Wed Aug 10, 2011 11:24 pm
Posts: 14
I Think we have to take two configuration(first.cfg.xml,second.cfg.xml) files and we should configure with two data bases.

In client application

SessionFactory sf1=new Configuration().configure("first.cfg.xml").buildSessionFactory();
SessionFactory sf2=new Configuration().configure("second.cfg.xml").buildSessionFactory();

then we can access two databases.

_________________
With Best Regards
SreenivaS
Save trees Save life


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.