"kabir.khan(a)jboss.com" wrote : Similar to the getModuleForClass() from JBCL-78
| discussed here
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143639&a...
|
| I would like to add an additional method to Module:
|
| | public Module getModuleForClassLoader(ClassLoader cl) throws
ClassNotFoundException
| | {
| | SecurityManager sm = System.getSecurityManager();
| | if (sm != null)
| | sm.checkPermission(new RuntimePermission("getClassLoader"));
| |
| | // Determine the module (if any) for the classloader
| | if (cl != null)
| | return modulesByClassLoader.get(cl);
| | // Unknown
| | return null;
| | }
| |
| I need this to initialise my classpool domains with the bootstrap classloaders, since
they are not getting picked up by the AOPClassLoaderDeployer in AS.
Ok with me. Your "workaround" looks horrible. :-)
The use of the MC to implement the classloading dependencies is an implemention detail,
it could change without notice.
anonymous wrote :
| I have created an org.jboss.bootstrap.spi.Bootstrap implementation to pick up the
classloaders created by the bootstrap deployments.
|
| Next I need a method to get the Module for each classloader so I can push that into
the AOP registry. I am not sure if Module is the right place for it, since I have no
initiating Module at this stage.
|
I don't mind you adding static query methods to the Module class as long as
they have permissions checks.
In fact, I think the first part of your post would be better implemented by listing
all existing modules at aop initialization?
That way you don't depend upon the specific bootstrap implementation.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203609#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...