-->
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: CGLIBLazyInitializer classloader
PostPosted: Tue Jul 24, 2007 5:01 pm 
Newbie

Joined: Tue Jul 24, 2007 4:39 pm
Posts: 1
Hibernate v3.2.1

I have a webapp that will optionally load (via a custom classloader) classes that export data from the webapp to a warehouse. Since the exporting code is optional, one of the Hibernate classes (or cglib) are in the appserver's system classpath or the webapp's classpath.

The problem I see is with the interaction between CGLIBLazyInitializer and classpath. CGLIBLazyInitializer assumes (by it's use of Enhancer) that all necessary classes will be available in the classloader for the pojo - but in my case that's not true. The pojo classloader is unaware of hibernate/cglib.

What I need to be able to do is tell CGLIBLazyInitializer to use a different classloader. My situation is resolved is CGLIBLazyInitializer.getProxyFactory() sets the classloader for CGLIBLazyInitializer.class on the newly instantiated Enhancer object, but that may be too specific a solution. It seems that Hibernate should allow classloader configuration of the LazyInitializer.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 5:08 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Implement it, submit a patch to JIRA.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.