geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r397793 - /geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
Date Fri, 28 Apr 2006 07:56:27 GMT
Author: djencks
Date: Fri Apr 28 00:56:24 2006
New Revision: 397793

URL: http://svn.apache.org/viewcvs?rev=397793&view=rev
Log:
port GERONIMO-1409 - A Filter is initialized with a wrong TCCL from head

Modified:
    geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java

Modified: geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java?rev=397793&r1=397792&r2=397793&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
(original)
+++ geronimo/branches/1.1/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
Fri Apr 28 00:56:24 2006
@@ -38,7 +38,15 @@
         if (jettyServletRegistration != null) {
             ((WebApplicationHandler)jettyServletRegistration.getServletHandler()).addFilterHolder(this);
             putAll(initParams);
-            start();
+            
+            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+            try {
+                ClassLoader newCL = jettyServletRegistration.getWebClassLoader();
+                Thread.currentThread().setContextClassLoader(newCL);
+                start();
+            } finally {
+                Thread.currentThread().setContextClassLoader(oldCL);
+            }
         }
     }
 



Mime
View raw message