unfortunately you are wrong :(((

I wrote class A with main() that instantiates class B inside that calls its method 
getModifiedObject(String className). class B uses class C by reflection as you wrote 
and and invokes its method get(String className)
of course there is also Translator added to ClassPool (all in B class). Translator's 
code is supposed to insert some code to Foo.class. I can see that onLoad fires, so 
instrumenting takes place, but this what the C class gives to me (by 
Class.forName(className).new Instance() is an object of unmodified Foo.class :(  so 
chain A->B->C->Foo.class fails. Foo class loaded by C is not the modified one altough  
B uses C via reflection and uses translator.
to me this subject sucks badly. i know it is not javassist fault beacause it concerns 
generally issue called "how to modify class and use it". i'm totaly exhausted and I'll 
probably abadon "bytecode manipulation aop" and use "proxy based aop" :(((( 

http://asm.objectweb.org/doc/faq.html#Q5

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

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


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to