There are two parts to this, getting the classloader to intercept the calls to defineClass0 and getting AOP to work with any classloader setup.
The first one is easy, just a simple modification to the code that instruments the classloader should do it. The second one involves a change to the way that the AOP code uses javassist, requiring recursive calls to the classloader (and therefore instrumentation). This will not work with the 1.5 instrumentation as it filters out recursive calls, a very restrictive decision on Sun's part (IMHO). The AOP code actually has a thread local flag added so that the instrumented classloader works the same way as the 1.5 instrumentation, preventing recursive calls. The following is based on my current understanding and could be wrong! The code currently works by intercepting a classloader call to instrument a class and, from that point on, the instrumentation classloading hierarchy is driven by javassist. The AOP code uses javassist to load the class information for superclasses, interfaces etc. based on what javassist believes the hierarchy to be. A mismatch in this and things could possibly go wrong. What I would like to do is throw this back to the calling classloader and allow it to dictate the hierarchy, obviously involving a recursive call to the classloader :-(. I will make the classloader instrumentation change to allow you to use it with the IBM VM, you could try and see if it is sufficient to let you get something working. Which java version are you using? Kev View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3858997#3858997 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3858997 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
