-->
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: Query over tables stored in different database systems
PostPosted: Thu Oct 05, 2006 6:21 pm 
Newbie

Joined: Mon Oct 02, 2006 6:59 pm
Posts: 1
Hibernate version:3.1

Code between sessionFactory.openSession() and session.close():

Is it possible to execute a query (in SQL or HQL) over a set of different database systems?

Example: execute a query over the table Person (stored in SQL Server 2005) and Address stored in My SQL.


If it is not possible I would also appreciate solutions for this type of problem.


TIA,

Bruno


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 05, 2006 10:06 pm 
Regular
Regular

Joined: Tue Sep 26, 2006 11:37 am
Posts: 115
Location: Sacramento, CA
Here is some meager information to keep the thread alive :)

You can do distributed transaction in a J2EE environment
http://java.sun.com/products/jta/

You can point your Hibernate DAOs to the proper datasource.

It's pretty simple to integrate JTA if you use something like spring, other options possible.
http://www.springframework.org/docs/reference/orm.html

So if nothing else you can download results set/object trees from the 2 database servers and you can merge the final data in the code.

Marius


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.