-->
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.  [ 4 posts ] 
Author Message
 Post subject: Distributed transactions of more than 1 db using hibernate
PostPosted: Wed Jan 10, 2007 10:48 am 
Newbie

Joined: Wed Dec 06, 2006 7:33 am
Posts: 8
Location: Pakistan
Plz tell me how to handle distributed transactions between more than one databases using hibernate.. Does hibernate support this feature and how can we handle all this..

Thanks in advance..


Top
 Profile  
 
 Post subject: XA Datasource
PostPosted: Wed Jan 10, 2007 10:51 am 
Regular
Regular

Joined: Wed Aug 24, 2005 11:49 am
Posts: 63
Use a dataasource with XA transactions (eg. in JBoss).
It should 'just work' if you also use the transaction manager of your container.

_________________
Edwin van der Elst
Finalist IT Group


Top
 Profile  
 
 Post subject: multiple datasources in single hibernate configuration file
PostPosted: Wed Jan 10, 2007 11:09 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: That is not possible I think
PostPosted: Wed Jan 10, 2007 6:00 pm 
Regular
Regular

Joined: Wed Aug 24, 2005 11:49 am
Posts: 63
You need a configuration per datasource.
This will give you 2 sessionfactories. It is not possible (as far as I know) to use 2 datasources in 1 hibernate config. (And perform queries that operate at both databases at the same time).

_________________
Edwin van der Elst
Finalist IT Group


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