[jboss-jira] [JBoss JIRA] Commented: (JBCL-17) New ClassLoader not finding generated classes in the bootstrap classloader
Aleksandar Kostadinov (JIRA)
jira-events at lists.jboss.org
Wed Aug 20 00:49:23 EDT 2008
[ https://jira.jboss.org/jira/browse/JBCL-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12425789#action_12425789 ]
Aleksandar Kostadinov commented on JBCL-17:
-------------------------------------------
What if first getResource() is tried and if it returns null, then try loadClass()? Assuming a missing class is a rare condition we could possibly get the performance benefits and backwards compatibility together. I might be completely wrong tho :)
> New ClassLoader not finding generated classes in the bootstrap classloader
> --------------------------------------------------------------------------
>
> Key: JBCL-17
> URL: https://jira.jboss.org/jira/browse/JBCL-17
> Project: JBoss ClassLoader
> Issue Type: Bug
> Components: ClassLoader
> Affects Versions: JBossCL.2.0.0.Beta12
> Reporter: Adrian Brock
> Assignee: Adrian Brock
> Fix For: JBossCL.2.0.0.CR1
>
> Attachments: jboss-classloader.jar
>
>
> An optimisation in the new classloader is causing a backwards compatibility problem.
> When we load classes from the parent (bootstrap) classloader,
> we first check to see whether we can getResource() on the class file.
> This avoids excessive locking when many threads are trying to loadClass() on that classloader.
> However, if the class is a runtime generated class against that classloader getResource()
> will return null, leading to a ClassNotFoundException.
> While we've always done this optimization for JBoss ClassLoaders, it looks like we can't to do
> this non-jboss classloaders and maintain backwards compatibility.
--
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