Dear Chiba, thanks for that example, I knew that trick, but it is pretty useless for me. Please notice that instrumented code has to be inside "runable" class, so I have to fire such a class with "runner" and forward executing to its main method. It's awful drawback for me. I need to use plain class that can give me an instance of modified class. I want to use this mechanism inside other apps not making it the main application flow. if you develop f.e. web-app there's no comfort to run main() methods. I know what I want but do not know how to achieve it. The best solution would be loading all classes but the modified ones normally with standard loader and saving modified ones to f.e. /tmp/classes and load'em from that location with another classloader. but in my code it results of loading unmodified one, I mean first loaded unmodified bytecode overrides the new one or maybe it isn't even loaded because of delegation, so generally it fails. I used example code from ASM site to reload dynamicaly changed class by classloader that loads from bytecode and in Eclipse it works I got aspectized code, but using this in Tomcat fails. Javassist approach to create AOP is powerfull and very expresible but class loading issues makes it almost useless. I know JBoss guys solved it pretty well, but for ordinary user and ordinary purpose it is pain in the neck.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3842577#3842577 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3842577 ------------------------------------------------------- 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_idG21&alloc_id040&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
