-->
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: configuring multiple datasources in single hibernate.cfg.xml
PostPosted: Wed Jan 10, 2007 11:16 am 
Newbie

Joined: Wed Dec 06, 2006 7:33 am
Posts: 8
Location: Pakistan
I've configured multiple datasources in Application Server say 'JBoss'. Then how can we configure/use all these datasources in a [b]SINGLE[/b] hibernate configuration file, so that when we obtain a session factory based on that single configuration file, it could be used to execute distributed transaction across all configured datasources...

Thanks in advance..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 11:24 am 
Newbie

Joined: Fri Nov 03, 2006 5:21 am
Posts: 14
Hi,

you need a separate sessionFactory and a separate configuration file for every datasource.
Otherwise Hibernate wouldn't know which data source should be used for which mapping.

Regards,
Jörn


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.