I just started experimenting with Javassist and I already ran into trouble on the 
first tutorial page (the method interception one). If I compile and execute the 
example I get the following output (no files were changed):

--- pojo.noop(); ---
<<< Entering SimpleInterceptor
<<< Entering MethodInterceptor for: public void POJO.noop()
noop()
>>> Leaving MethodInterceptor
>>> Leaving SimpleInterceptor
--- pojo.test1(String param); ---
test1(String param): hello world
--- pojo.test1(int param); ---
<<< Entering MethodInterceptor for: public void POJO.test2(int)
<<< Entering MethodInterceptor for: public void POJO.test2(int)
test2(int param): 55
<<< Entering MethodInterceptor for: public void POJO$Bar.hello()
hello
>>> Leaving MethodInterceptor
>>> Leaving MethodInterceptor
>>> Leaving MethodInterceptor
--- POJO.test2(); ---
static method

Which is not what I expected since the static method test2() should be intercepted by 
the MethodInterceptor and the noop() method shouldn't be.

I'm not sure if I did anything wrong (I checked all the files and it seems to be ok) 
or how I can try to fix this problem, but I hope some one can help.

Thanks in advance,
Peter

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837083#3837083

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837083



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to