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.  [ 1 post ] 
Author Message
 Post subject: connecting loaded objects to transient 'managers'
PostPosted: Mon Jan 10, 2005 11:40 am 
Newbie

Joined: Thu Nov 04, 2004 10:24 am
Posts: 17
When I load objects from the DB, I want to hook them up to transient 'managers.' How do I do this?

In an example, my persistent classes are Auction and Bids; each Auction has a set of Bids. There are also transient classes AuctionManager and BidManager, which hold collections of the respective types of objects. A BidManager is used, for example, to notify the security department when a bid is higher than twice any other bid in the auction site.,

In a multi-frame Swing app, each frame shows an independent AuctionSite and so holds its own AuctionManager and a BidManager.

I need to set a manager field in each Auction and in each Bid, as it is loaded. In loading Auctions in a given AuctionSite by query, I set the relevant AuctionManager on each one.

But the Bids get loaded lazily, by reachabilility from their 'parent' Auction. I have no hook into the loading process by which I can set the Bid's BidManager (onLoad does not offer any way to find the 'right' BidManager for the purpose).

Any ideas?

Joshua


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.