[
https://jira.jboss.org/jira/browse/JBAS-5176?page=com.atlassian.jira.plug...
]
Adrian Brock commented on JBAS-5176:
------------------------------------
This issue is out-of-date. It has already been fixed.
But there is a related issue on which classloader to use as the context classloader
when running the "bootstraps".
Currently we have two bootstraps, the core MC and a seperate JMX one.
For JBoss5 it is not really an issue since all the bootstrap configurations are
configured
with classloaders that importAll=true in the DefaultDomain, so it doesn't really
matter
what classloader gets used.
The issue is that it uses bootstrap.getClass().getClassLoader() which may not always be
correct
(i.e. when the "bootstrap" is instantiated by a different "deployment"
to where the class is located).
See AbstractServerImpl (the same issue occurs for stopping bootstraps)
// TODO Fix the TCL hack used here!
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try
{
// Run the bootstraps
for (Bootstrap bootstrap : bootstraps)
{
Thread.currentThread().setContextClassLoader(bootstrap.getClass().getClassLoader());
startedBootstraps.add(0, bootstrap);
bootstrap.start(this);
}
}
finally
{
Thread.currentThread().setContextClassLoader(cl);
}
The correct fix would probably be to remember the context classloader that is
being used at "addBootstrap"?
Remove the first classloader hack from the ProfileServiceBootstrap
------------------------------------------------------------------
Key: JBAS-5176
URL:
https://jira.jboss.org/jira/browse/JBAS-5176
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public(Everyone can see)
Components: ProfileService
Reporter: Adrian Brock
Assignee: Adrian Brock
Fix For: JBossAS-5.0.0.CR2
When JBMICROCONT-230 is in trunk we can remove the hack from the profile service
bootstrap
that sets the context classloader to the first bootstrap classloader.
--
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