[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
Thanks Kevin for your assistance, I appreciate it. Please keep me posted. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859934#3859934 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859934 --- 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 JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
anonymous wrote : I tried altering the following part of the replace call in AspectManager.getInstrumentedClassLoader(): Yes, I would have added another test based on the number of parameters but it would have resulted in the same. I downloaded the 1.4.2 JDK over the weekend and that appears to have a different method name and signature (from cursory inspection). anonymous wrote : Ultimately it dies at the same place as before. It still throws the same exception, stating that it is unable to aspectize a class because it is unable to find another class that it references. I have seen this happen when a class contains references to other classes that do not exist on the classpath (or at least not that javassist can find). Javassist seems to be very strict in this requirement. anonymous wrote : As far as the recursive classloading techniques, I'd be interested in trying that out, would I need to dig into javassist? I'll start there and see what I can find, but please feel free to give any directions you might find helpful (I understand that you're pretty strapped for time). The change to the classloading will probably not help with the previous problem unless webSphere has the classes somewhere that cannot be resolved by Javassist. I'll dig through javassist later this evening and see if I can find a fix for the problem, it has been an issue that I have been ignoring until now :-). I have a hard deadline of 18th January and should be able to look at the classloading shortly afterwards. The changes will have to go via Bill and Kabir though as they will break the 1.5 mechanism. Kev View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859409#3859409 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859409 --- 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
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
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=bbop=viewtopicp=3858997#3858997 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=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
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
I'm using 1.4.1 of the IBM VM. We're pretty much tied to WebSphere on this project, so even if we did upgrade to 6.0 in the near term (which we won't) we'd still only be on 1.4.2. I tried altering the following part of the replace call in AspectManager.getInstrumentedClassLoader(): + $_ = $proceed($1, newBytes, 0, newBytes.length, $5) ; with + $_ = $proceed($1, newBytes, 0, newBytes.length, $5, $6, $7) ; Just like before when I set jboss.aop.verbose to true it chatters on about trying to transform certain objects and determining what methods should be aspectized. That seems to indicate that the AspectManager is being called at the correct time before the defineClass0 method is called, and that classes are successfully being loaded to some degree. Ultimately it dies at the same place as before. It still throws the same exception, stating that it is unable to aspectize a class because it is unable to find another class that it references. Not sure if the above fix is the fix you were envisioning or not, but I thought I'd give it a try from what I understand about the code. As far as the recursive classloading techniques, I'd be interested in trying that out, would I need to dig into javassist? I'll start there and see what I can find, but please feel free to give any directions you might find helpful (I understand that you're pretty strapped for time). Thanks for the help, Tom View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859092#3859092 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859092 --- 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
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
Tom, thanks for all your patience here... Did you ever try just using the precompiler? (AOPC) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859096#3859096 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859096 --- 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
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
I'm not sure whether aopc would work for my situation. I'm using IBM's web services implementation for WebSphere, which include a bunch of closed source classes. Those classes are the ones I want to do the instrumentation on. I didn't try it with jboss-aop, but I tried to instrument the classes with aspectj and it seemed to have some issues getting at those classes or at least it being difficult to get it to do so. With aopc would it recompile the appropriate classes in those jar files to something new? I'd need to then determine what changed and make sure pathing is correct for the classloaders involved. Sorry my understanding is just starting to grow about the innerworkings of classloaders, compilers and the other tools used internally to AOP implementations. Now that I understand javassist's role with jboss-aop a little better and how it is able to alter the actual bytecode, I'm wondering if aopc would be a possibility. The loadtime transformations would be handy though. I'm in early phases of using aop, mostly for debugging and logging while I'm developing and just making a quick change to an xml file for some reason seems much more appealing than having to recompile all of the classes everytime I want to change a pointcut. Like I said before I'd be happy to do what I can to get this working. Thanks, Tom View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859102#3859102 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859102 --- 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
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: jboss aop on websphere
Yeah you're right about the IBM VM, there are two extra args on their version of the method (a java.security.cert.Certificate and byte[]). It looks like those are related to extra security things that IBM is doing. Kevin, from your comments and looking into it more seems like the issue I'm having is in working with WebShpere and the multiple classloaders. I think the java.lang.ClassLoader that is created from the GenerateInstrumentedClassLoader works fine for a simple app. If you think otherwise I'd be interested in what I could do to fix it at that level before trying to get into a WebSphere fix. anonymous wrote : I haven't looked at the code lately but it used to rely on the javassist classloading to mirror the classloading policy within the VM. Generating the java.lang.ClassLoader from the GenerateInstrumentedClassLoader I don't think does this. Where would I find the code that would do something like this? Also, I'd be happy to do what I could to get something like this working in WebSphere (assuming that the same implementation may not work in both JBoss AS and WebSphere). Thanks, Tom View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3858900#3858900 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3858900 --- 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