diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-23 20:48:44 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-23 20:48:44 +0000 |
commit | ff20788f3f393d46a942cba0e3168bf9294f6cab (patch) | |
tree | 234bb2f8dbe88827eda5326a96802845b6508ae9 /branches/sca-java-1.x/modules/host-webapp | |
parent | 3c764a6565b76c491e7f14515a8418b9bffed75a (diff) |
TUSCANY-3173 remove the contents of thread local storage when the webapp shuts down. If you don't remove it the thread local storage will hold an object which, via its class, points to the WebAppClassloader. With a container with pooled threads this pins the classloader so it can't be GCd
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@797219 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/host-webapp')
-rw-r--r-- | branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java b/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java index a33d29df9f..27dd89d31b 100644 --- a/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java +++ b/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java @@ -43,6 +43,7 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.apache.commons.logging.LogFactory; +import org.apache.tuscany.sca.core.invocation.ThreadMessageContext; import org.apache.tuscany.sca.host.embedded.SCADomain; import org.apache.tuscany.sca.host.http.SecurityContext; import org.apache.tuscany.sca.host.http.ServletHost; @@ -329,7 +330,8 @@ public class WebAppServletHost implements ServletHost { instance = null; servlets.clear(); LogFactory.release(this.getClass().getClassLoader()); - Introspector.flushCaches(); + Introspector.flushCaches(); + ThreadMessageContext.removeMessageContext(); } public String getContextPath() { |