[jboss-jira] [JBoss JIRA] Commented: (JBCL-78) Way to determine the module/classloader for a class

Adrian Brock (JIRA) jira-events at lists.jboss.org
Tue Jan 13 09:46:04 EST 2009


    [ https://jira.jboss.org/jira/browse/JBCL-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12447611#action_12447611 ] 

Adrian Brock commented on JBCL-78:
----------------------------------

I've added
Module.getModuleForClass(String className)
BaseClassLoader.getClassLoaderForClass(String className)
both need the "getClassLoader" RuntimePermission with a security manager installed.

While I was there I also added methods to loadClass() and getResource(s) from the module
which are a convience over the associated classloader which isn't exposed.
They will throw IllegalStateException if the classloader for the module has not been installed yet.

I'll keep this open until Kabir has had a chance to test this with aop.
There is a 2.0.2-SNAPSHOT available for that purpose.

> Way to determine the module/classloader for a class
> ---------------------------------------------------
>
>                 Key: JBCL-78
>                 URL: https://jira.jboss.org/jira/browse/JBCL-78
>             Project: JBoss ClassLoader
>          Issue Type: Feature Request
>          Components: ClassLoader, Modules
>            Reporter: Kabir Khan
>            Assignee: Adrian Brock
>             Fix For: JBossCL.2.0.2.GA, JBossCL.2.2.0.Alpha
>
>
> Add methods to discover which from which module/classloader a class will be loaded.
> Ideally since this is for aop it should not actually load the class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list