geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1349113 - in /geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat: GeronimoStandardContext.java interceptor/RequestListenerBeforeAfter.java
Date Tue, 12 Jun 2012 04:08:48 GMT
Author: xiaming
Date: Tue Jun 12 04:08:48 2012
New Revision: 1349113

URL: http://svn.apache.org/viewvc?rev=1349113&view=rev
Log:
GERONIMO-6316 Add logic for requestDestroy listener method to fix the tck failures

Modified:
    geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/RequestListenerBeforeAfter.java

Modified: geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=1349113&r1=1349112&r2=1349113&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Tue Jun 12 04:08:48 2012
@@ -902,6 +902,11 @@ public class GeronimoStandardContext ext
     public boolean fireRequestDestroyEvent(ServletRequest request) {
         return true;
     }
+    
+    
+    public boolean fireRequestDestroyEventInBeforeAfter(ServletRequest request) {
+        return super.fireRequestDestroyEvent(request);
+    }
 
     public boolean fireRequestInitEventInBeforeAfter(ServletRequest request) {
         return super.fireRequestInitEvent(request);

Modified: geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/RequestListenerBeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/RequestListenerBeforeAfter.java?rev=1349113&r1=1349112&r2=1349113&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/RequestListenerBeforeAfter.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/RequestListenerBeforeAfter.java
Tue Jun 12 04:08:48 2012
@@ -53,6 +53,13 @@ public class RequestListenerBeforeAfter 
 
     public void after(BeforeAfterContext beforeAfterContext, ServletRequest httpRequest,
ServletResponse httpResponse,
             int dispatch) {
+        if (httpRequest != null && httpResponse != null) {
+            DispatcherType dispatcherType = httpRequest.getDispatcherType();
+            if (dispatcherType == DispatcherType.REQUEST
+                    || (dispatcherType == DispatcherType.FORWARD && standardContext.getFireRequestListenersOnForwards()))
{
+                standardContext.fireRequestDestroyEventInBeforeAfter(httpRequest);
+            }
+        }
         if (next != null) {
             next.after(beforeAfterContext, httpRequest, httpResponse, dispatch);
         }



Mime
View raw message