[jboss-user] [JBoss AOP Development] New message: "Re: ClassPool Refactoring"

Flavia Rainone do-not-reply at jboss.com
Tue Jan 26 08:16:50 EST 2010


User development,

A new message was posted in the thread "ClassPool Refactoring":

http://community.jboss.org/message/522295#522295

Author  : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com

Message:
--------------------------------------------------------------
A quick update on this: for some reason, the behavior of ClassPool.get method is no longer consistent with ScopedClassPool.getLocally method.
 
The first time AOP asks for a class, during transformation, it knows that the class should be generated by the exact same classpool that corresponds to the classloader that loaded the class, so it uses getLocally.
The second time AOP asks for the class is during the same transformation (these are actually indirect calls made from inside javassist, during call weaving, for example), the class is retrieved through get. Currently, the classpool delegates the retrieval of the class to the default domain, and the default domain returns a different class.
 
I think that clearly every call to get should check first whether the class is already in the local classes cache. Adding such a check fixed most of the failing tests in AS trunk (only two failures left), but broke the cache tests of Kabir's implementation.
 
So, I have a few questions regarding this:
- why is it that calling get on the default domain returns a different version of the same class? This needs further investigation because it is clearly a bug
- why wasn't the classes cache being used by BaseClassPool.get before? Any reason for this? This has been copied from previous versions, I think that it definetly causes some overhead (the above should work, but it would be faster if the classpool finds out it has already created the class and returns the same class instead of delegating to the domain first).
- if the cache starts being used as a first step of BaseClassPool.get, as it is in my local fix (not committed yet), is there need for a second level cache as Kabir wrote?
 
My next steps will be:
- investigate the next couple of AOP tests that are failing
- investigate the majority of scoped AOP tests that are failing
- investigate why is it that the default domain pool is returning a class that it shouldn't return at all

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/522295#522295




More information about the jboss-user mailing list