-->
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: same persistent object with two databases
PostPosted: Wed Dec 01, 2004 7:28 am 
Newbie

Joined: Wed Dec 01, 2004 7:19 am
Posts: 1
[b]Hibernate version:[/b] 2.1.7

I'm designing an application and have to decide whether hibernate will be useful or not. Hence, at this stage, I'm unable to provide you with other details you had asked to post this query.

Here is the situation :

I have <B>two databases</B> D1 and D2 sitting on different physical servers both being oracle.

I have to access two/three tables from each of these databases, merge the data and create a report out of it.

Is it possible to configure Hibernate in such a way that a persistent object is associated with (linked with) these two databases(D1 and D2) at the same time? If it is could you please suggest how to do it? If not can you suggest an alternative approach (Well other than JDBC)?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 01, 2004 9:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well - hibernate doesn't do "same entity - multiple databases".

I don't know *how* I would do it, and does it even make sense ?

What you can do is create two sessionfactories - one for each database and then use those two for your access.

If the classes are the same across the two databases you should be able to load from DB1 and save to DB2 - if that is what you want....but you will have to manage some of the session "movement" your self.

_________________
Max
Don't forget to rate


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.