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: Any relationship problems
PostPosted: Tue Nov 14, 2006 3:50 pm 
Newbie

Joined: Tue Nov 14, 2006 3:23 pm
Posts: 2
We have the concept of a queue. It has an intersection table that is mapped to many queue assignments. The queue assignment uses an any type to allow it to map to any object in the system. All objects in the system can be queued using this approach and it has worked well. One particular object (Account and it's joined subclasses) has a nightly batch job that automatically populates queues with accounts based on customizable rules. Performance is an issue because loading the massive account object and the non-lazy attributes (most attributes are lazy) takes a lot of time. Profiling the code tells me that loading the account is my only problem and removing that should yeild something on the order of a ten-fold improvement.

To speed the process up, I was thinking I could use a lazy subclass of account to "stub out" the relationship, but that won't work because the true concrete class name is required. I know that I could use a fast JDBC SQL query to get the subclass descriminator, but am not sure how I could go from that to a concrete class name (without a hard-coded case statement) and mock up the any relationship in a way that would satisfy hibernate so it doesn't need to load the account.

Hope that wasn't too long-winded. The crux of the issue is that I don't have time to totally rewrite the system to use straight JDBC for the entire batch process. And that would end in a disconnect between the real-time features and batch handling of these objects that could result in a maintenance headache.

Thanks for your help..
Jerry..


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.