452201 EnvConfiguration.destroy() should set the classloader
This commit is contained in:
parent
9792cec6db
commit
a0f6d07847
|
@ -185,9 +185,14 @@ public class EnvConfiguration extends AbstractConfiguration
|
||||||
@Override
|
@Override
|
||||||
public void destroy (WebAppContext context) throws Exception
|
public void destroy (WebAppContext context) throws Exception
|
||||||
{
|
{
|
||||||
|
ClassLoader old_loader = Thread.currentThread().getContextClassLoader();
|
||||||
|
Thread.currentThread().setContextClassLoader(context.getClassLoader());
|
||||||
|
ContextFactory.associateClassLoader(context.getClassLoader());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//unbind any NamingEntries that were configured in this webapp's name space
|
//unbind any NamingEntries that were configured in this webapp's name space
|
||||||
|
|
||||||
NamingContext scopeContext = (NamingContext)NamingEntryUtil.getContextForScope(context);
|
NamingContext scopeContext = (NamingContext)NamingEntryUtil.getContextForScope(context);
|
||||||
scopeContext.getParent().destroySubcontext(scopeContext.getName());
|
scopeContext.getParent().destroySubcontext(scopeContext.getName());
|
||||||
}
|
}
|
||||||
|
@ -196,6 +201,11 @@ public class EnvConfiguration extends AbstractConfiguration
|
||||||
LOG.ignore(e);
|
LOG.ignore(e);
|
||||||
LOG.debug("No naming entries configured in environment for webapp "+context);
|
LOG.debug("No naming entries configured in environment for webapp "+context);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ContextFactory.disassociateClassLoader();
|
||||||
|
Thread.currentThread().setContextClassLoader(old_loader);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue