[seam-dev] Javassist limitation?

Sebastian Hennebrueder usenet at laliluna.de
Mon May 19 03:56:38 EDT 2008


Dan Allen schrieb:
> On Sun, May 18, 2008 at 8:54 PM, Emmanuel Bernard
> <emmanuel at hibernate.org> wrote:
>> I am pretty sure EJB has the same limitation.
> 
> You are correct. Hmm. Fact of life I suppose.
> 
> This sounds to me like a great FAQ for the wiki. I will write it up as
> soon as I get a chance. Just one of those good to know things.
> 
>  I am guessing that Spring AOP would have the same limitation as well,
> being based on JDK proxies. Out of curiosity, I wonder whether AspectJ
> is able to catch such calls.
> 
> -Dan
> 

JDK Proxies behave like a wrapper class (decorator). Once you are in the 
wrapped class no internal method call will pass by the proxy.

If every call should be intercepted, Byte Code 
instrumentation/generation is required. This can be provided for example 
by cglib or javassist. The additional code for example interceptor code 
will be written to the original class.

I don't know this part of the Seam source code but I am actually 
wondering if Seam interceptors makes use of Javassist. I assume that 
they use JDK proxies or if they use Javassist the code takes care that a 
interceptor is only called once.

Best Regards

Sebastian




More information about the seam-dev mailing list