db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Anthony <charles.anth...@hpdsoftware.com>
Subject RE: OJB Proxies
Date Thu, 23 Sep 2004 09:27:30 GMT
> From: Chris Nokleberg [mailto:chris@sixlegs.com]
> Sent: 23 September 2004 03:36
> To: ojb-dev@db.apache.org
> Subject: Re: OJB Proxies
> > 
> Field interception is typically (including in CGLIB) handled 
> by wrapping code
> around all the getfield and putfield instructions in the 
> calling code. This
> means that reflection will bypass the interception code. 
> JBoss AOP and perhaps
> Aspectwerkz have better support for this, by intercepting all 
> of the reflection
> related methods (e.g. Field.getXXX), but as you can imagine 
> this can get ugly
> pretty quickly--I don't recommend it.
> Chris

Thanks for that, Chris - I was just about to try and build an simple example
and send it to the CGLIB list. Saves me getting egg-on-my-face.

In other words, reflection interception is probably a no-no. Makes sense. My
plan, such that it is, is to modify our reflectionhelper code to check to
see if an object is a proxy and "re-direct" the reflection to the
real-object as necessary.

So, I guess it's time to experiment with dynaop as per Brian's suggestion.



HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message