org.jboss.net.axis
public class: ResetClassLoaderHandler [javadoc |
source]
java.lang.Object
org.apache.axis.handlers.BasicHandler
org.jboss.net.axis.ResetClassLoaderHandler
Direct Known Subclasses:
SetClassLoaderHandler
This handler is to restore a previously changed classpath and
should be put in most cases into a response chain.
Change notes
- created:
11.03.2002 -
- author:
< - a href="mailto:Christoph.Jung@infor.de">Christoph G. Jung
- version:
$ - Revision: 1.2 $
| Method from org.jboss.net.axis.ResetClassLoaderHandler Detail: |
public void invoke(MessageContext msgContext) {
resetClassLoader(msgContext);
}
|
public void onFault(MessageContext msgContext) {
resetClassLoader(msgContext);
}
|
protected void resetClassLoader(MessageContext msgContext) {
ClassLoader loader = (ClassLoader) msgContext.getProperty(Constants.OLD_CLASSLOADER_PROPERTY);
if (loader != null) {
msgContext.setProperty(Constants.OLD_CLASSLOADER_PROPERTY, null);
Thread.currentThread().setContextClassLoader(loader);
}
}
reset the thread associated classloader to some old value stored in the
message context |