By the way, you should consider what will make things easier for you
as changes to the classloader api.
Although as you know I don't agree with using the classloader to determine
what aspects apply, when I looked at it before, the basic information you are trying
to work out is:
"from this classloader where does it load this other class?"
Then from that found class you go
class -> classloader -> application/sub-deployment -> aspect config
The basics of this query already exists at the jmx level,
look at the jboss.classloader on the jmx console or BaseClassLoaderMBean
| /**
| * Find the classloader for a class
| *
| * @param name the class name
| * @return the classloader or null if it is not loaded by a managed classloader
| * @throws ClassNotFoundException when the class is not found
| */
| ObjectName findClassLoaderForClass(String name) throws ClassNotFoundException;
|
I wouldn't have a problem with adding something like the following to the Module
ClassLoader findClassLoaderForClass(String name) throws ClassNotFoundException;
or
Module findModuleForClass(String name) throws ClassNotFoundException;
or other things that might be useful.
Once you have the classloader/module you can work out the
(sub-)deployment/aspect domain.
Or equally if that is not useful to you, we can discuss other helpers that are. ;-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181540#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...