geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r360478 - /geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
Date Sun, 01 Jan 2006 07:36:13 GMT
Author: gdamour
Date: Sat Dec 31 23:36:08 2005
New Revision: 360478

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

Set the Web-app CL as the TCCL when starting a Filter.

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

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java?rev=360478&r1=360477&r2=360478&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
Sat Dec 31 23:36:08 2005
@@ -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