-->
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: Subclassing across datasources
PostPosted: Thu Aug 18, 2005 5:55 pm 
Newbie

Joined: Thu Aug 18, 2005 5:39 pm
Posts: 8
Hello,

I was wondering if it is possible to span a sub-classed object across multiple data sources, i.e.:

abstract class Shape {
protected color;

...

}

class Circle extends Shape {
private int radius;

...
}

And have the shape data come from one data source, and circle data from another. Obviously for this example it would make little sense, however I can assure you in the “real life” problem domain there are defendable motivations for doing this :) (e.g. data management/security).

My travels on the forums indicate the answer is no as of Jan 2004. Is this still the case (as I read much has changed in v3)? If so, how is everyone dealing with these situations? Re-thinking the OO architecture of the app? Any clever tricks?

Thanks in Advance,

Richard Wareing


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 6:10 pm 
Senior
Senior

Joined: Thu May 12, 2005 11:40 pm
Posts: 125
Location: Canada
I think you would have to configure two SessionFactories which would make it impossible to access both entities transparently in one transaction, though you may have some luck combining the two physical data sources into one logical JDBC data source using something like C-JDBC or HA-JDBC.


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.