Author: markt
Date: Thu Jan  3 22:26:10 2013
New Revision: 1428645

URL: http://svn.apache.org/viewvc?rev=1428645&view=rev
Log:
Stop broken filters breaking things on application stop.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1428643

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java?rev=1428645&r1=1428644&r2=1428645&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java 
Thu Jan  3 22:26:10 2013
@@ -309,7 +309,15 @@ public final class ApplicationFilterConf
                 }
                 SecurityUtil.remove(filter);
             } else {
-                filter.destroy();
+                try {
+                    filter.destroy();
+                } catch (Throwable t) {
+                    ExceptionUtils.handleThrowable(t);
+                    context.getLogger().error(sm.getString(
+                            "applicationFilterConfig.release",
+                            filterDef.getFilterName(),
+                            filterDef.getFilterClass()), t);
+                }
             }
             if (!context.getIgnoreAnnotations()) {
                 try {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1428645&r1=1428644&r2=1428645&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties 
Thu Jan  3 22:26:10 2013
@@ -44,6 +44,7 @@ applicationDispatcher.specViolation.resp
 applicationFilterConfig.jmxRegisterFail=JMX registration failed for filter of 
type [{0}] and name [{1}]
 applicationFilterConfig.jmxUnregister=JMX de-registration complete for filter 
of type [{0}] and name [{1}]
 applicationFilterConfig.jmxUnregisterFail=JMX de-registration failed for 
filter of type [{0}] and name [{1}]
+applicationFilterConfig.release=Failed to destroy the filter named [{0}] of 
type [{1}]
 applicationFilterRegistration.nullInitParam=Unable to set initialisation 
parameter for filter due to null name and/or value. Name [{0}], Value [{1}]
 applicationFilterRegistration.nullInitParams=Unable to set initialisation 
parameters for filter due to null name and/or value. Name [{0}], Value [{1}]
 applicationRequest.badParent=Cannot locate parent Request implementation

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1428645&r1=1428644&r2=1428645&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jan  3 22:26:10 2013
@@ -70,6 +70,10 @@
         extension validation by including the name of the JAR file in the
         exception. (markt)
       </fix>
+      <fix>
+        Allow web applications to be stopped cleanly even if filters shown
+        exceptions when their destroy() method is called. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to