geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r743429 - in /geronimo/sandbox/djencks/jetty7: geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/ geronimo-jetty7/src/main...
Date Wed, 11 Feb 2009 17:55:07 GMT
Author: djencks
Date: Wed Feb 11 17:55:06 2009
New Revision: 743429

URL: http://svn.apache.org/viewvc?rev=743429&view=rev
Log:
GERONIMO-4249 Update to jetty-7 trunk after jaspi branch merge

Modified:
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/AbstractClusteredPreHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ClusteredSessionHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/WADIClusteredPreHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ComponentContextHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ThreadClassloaderHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/AbstractClusteredPreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/AbstractClusteredPreHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/AbstractClusteredPreHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/AbstractClusteredPreHandler.java
Wed Feb 11 17:55:06 2009
@@ -25,6 +25,7 @@
 import org.apache.geronimo.clustering.ClusteredInvocation;
 import org.apache.geronimo.clustering.ClusteredInvocationException;
 import org.apache.geronimo.jetty7.AbstractPreHandler;
+import org.mortbay.jetty.Request;
 import org.mortbay.jetty.HttpException;
 
 /**
@@ -32,9 +33,9 @@
  */
 public abstract class AbstractClusteredPreHandler extends AbstractPreHandler {
 
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch)
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
-        ClusteredInvocation invocation = newClusteredInvocation(target, request, response,
dispatch);
+        ClusteredInvocation invocation = newClusteredInvocation(target, request, response);
         try {
             invocation.invoke();
         } catch (ClusteredInvocationException e) {
@@ -50,25 +51,23 @@
     }
 
     protected abstract ClusteredInvocation newClusteredInvocation(String target,
-            HttpServletRequest request, HttpServletResponse response, int dispatch);
+                                                                  HttpServletRequest request,
HttpServletResponse response);
 
 
     protected abstract class WebClusteredInvocation implements ClusteredInvocation {
         protected final String target;
         protected final HttpServletRequest request;
         protected final HttpServletResponse response;
-        protected final int dispatch;
 
-        protected WebClusteredInvocation(String target, HttpServletRequest request, HttpServletResponse
response, int dispatch) {
+        protected WebClusteredInvocation(String target, HttpServletRequest request, HttpServletResponse
response) {
             this.target = target;
             this.request = request;
             this.response = response;
-            this.dispatch = dispatch;
         }
 
         protected void invokeLocally() throws ClusteredInvocationException {
             try {
-                next.handle(target, request, response, dispatch);
+                next.handle(target, request, response);
             } catch (IOException e) {
                 throw new ClusteredInvocationException(e);
             } catch (ServletException e) {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ClusteredSessionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ClusteredSessionHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ClusteredSessionHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/ClusteredSessionHandler.java
Wed Feb 11 17:55:06 2009
@@ -24,6 +24,7 @@
 
 import org.apache.geronimo.jetty7.AbstractPreHandler;
 import org.apache.geronimo.jetty7.PreHandler;
+//import org.mortbay.jetty.Request;
 import org.mortbay.jetty.servlet.SessionHandler;
 
 /**
@@ -44,26 +45,26 @@
     }
     
     @Override
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch)
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
-        setRequestedId(request, dispatch);
+        setRequestedId(request);
         try {
-            chainedHandler.handle(target, request, response, dispatch);
+            chainedHandler.handle(target, request, response);
         } catch (ServletException e) {
             throw (IOException) new IOException().initCause(e);
         }
     }
     
-    protected void doHandle(String target, HttpServletRequest request, HttpServletResponse
response, int dispatch)
+    protected void doHandle(String target, HttpServletRequest request, HttpServletResponse
response)
             throws IOException, ServletException {
-        super.handle(target, request, response, dispatch);
+        super.handle(target, request, response);
     }
 
     private class ActualHandler extends AbstractPreHandler {
 
-        public void handle(String target, HttpServletRequest request, HttpServletResponse
response, int dispatch)
+        public void handle(String target, HttpServletRequest request, HttpServletResponse
response)
                 throws IOException, ServletException {
-            doHandle(target, request, response, dispatch);
+            doHandle(target, request, response);
         }
     }
 

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/WADIClusteredPreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/WADIClusteredPreHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/WADIClusteredPreHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7-clustering-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/WADIClusteredPreHandler.java
Wed Feb 11 17:55:06 2009
@@ -31,6 +31,7 @@
 import org.codehaus.wadi.core.contextualiser.InvocationException;
 import org.codehaus.wadi.core.manager.Manager;
 import org.codehaus.wadi.web.impl.WebInvocation;
+import org.mortbay.jetty.Request;
 
 
 /**
@@ -45,15 +46,15 @@
     }
     
     protected ClusteredInvocation newClusteredInvocation(String target, HttpServletRequest
request,
-            HttpServletResponse response, int dispatch) {
-        return new WADIWebClusteredInvocation(target, request, response, dispatch);
+                                                         HttpServletResponse response) {
+        return new WADIWebClusteredInvocation(target, request, response);
     }
     
     protected class WADIWebClusteredInvocation extends WebClusteredInvocation {
         
         public WADIWebClusteredInvocation(String target, HttpServletRequest request,
-                HttpServletResponse response, int dispatch) {
-            super(target, request, response, dispatch);
+                                          HttpServletResponse response) {
+            super(target, request, response);
         }
 
         public void invoke() throws ClusteredInvocationException {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
Wed Feb 11 17:55:06 2009
@@ -30,6 +30,7 @@
 import org.apache.geronimo.jetty7.handler.LifecycleCommand;
 import org.apache.geronimo.security.Callers;
 import org.apache.geronimo.security.ContextManager;
+import org.mortbay.jetty.Request;
 import org.mortbay.jetty.servlet.ServletHolder;
 
 /**
@@ -56,17 +57,17 @@
      * Service a request with this servlet.  Set the ThreadLocal to hold the
      * current JettyServletHolder.
      */
-    public void handle(ServletRequest request, ServletResponse response)
+    public void handle(Request baseRequest, ServletRequest request, ServletResponse response)
             throws ServletException, UnavailableException, IOException {
         String oldServletName = getCurrentServletName();
         setCurrentServletName(getName());
         try {
             if (runAsSubject == null) {
-                super.handle(request, response);
+                super.handle(baseRequest, request, response);
             } else {
                 Callers oldCallers = ContextManager.pushNextCaller(runAsSubject);
                 try {
-                    super.handle(request, response);
+                    super.handle(baseRequest, request, response);
                 } finally {
                     ContextManager.popCallers(oldCallers);
                 }

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
Wed Feb 11 17:55:06 2009
@@ -28,7 +28,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.mortbay.jetty.HttpException;
 import org.mortbay.jetty.Request;
@@ -74,6 +73,7 @@
         this.contextPath = contextPath;
         this.webServiceContainer = webServiceContainer;
         this.setContextPath(contextPath);
+        this.setAllowNullPathInfo(true);
         
 //        if (internalJAASJettyRealm != null) {
         if (realmName != null) {
@@ -119,7 +119,7 @@
         return contextPath;
     }
 
-    public void handle(String target, HttpServletRequest req, HttpServletResponse res, int
dispatch)
+    public void doHandle(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse
res)
             throws IOException, ServletException
     {
         //TODO
@@ -127,10 +127,10 @@
         if (! target.startsWith(contextPath)) {
             return;
         }
-        Request jettyRequest = (Request) req;
+//        Request jettyRequest = (Request) req;
         Response jettyResponse = (Response) res;
         res.setContentType("text/xml");
-        RequestAdapter request = new RequestAdapter(jettyRequest);
+        RequestAdapter request = new RequestAdapter(baseRequest);
         ResponseAdapter response = new ResponseAdapter(jettyResponse);
 
         request.setAttribute(WebServiceContainer.SERVLET_REQUEST, req);
@@ -141,7 +141,7 @@
         if (req.getParameter("wsdl") != null) {
             try {
                 webServiceContainer.getWsdl(request, response);
-                jettyRequest.setHandled(true);
+                baseRequest.setHandled(true);
             } catch (IOException e) {
                 throw e;
             } catch (Exception e) {
@@ -153,7 +153,7 @@
                     throw new HttpException(403, null);
                 }
             } else if (isIntegralTransportGuarantee) {
-                if (!jettyRequest.getConnection().isIntegral(jettyRequest)) {
+                if (!baseRequest.getConnection().isIntegral(baseRequest)) {
                     throw new HttpException(403, null);
                 }
             }
@@ -176,7 +176,7 @@
 //                }
                 try {
                     webServiceContainer.invoke(request, response);
-                    jettyRequest.setHandled(true);
+                    baseRequest.setHandled(true);
                 } catch (IOException e) {
                     throw e;
                 } catch (Exception e) {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
Wed Feb 11 17:55:06 2009
@@ -17,6 +17,9 @@
 package org.apache.geronimo.jetty7;
 
 import java.util.Collection;
+import java.util.EnumSet;
+
+import javax.servlet.DispatcherType;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -79,23 +82,23 @@
             assert jettyServletHolders != null ^ urlPatterns != null;
 
             String filterName = jettyFilterHolder.getFilterName();
-            int dispatches = 0;
+            EnumSet<DispatcherType> dispatches = EnumSet.noneOf(DispatcherType.class);
             if (requestDispatch) {
-                dispatches |= Handler.REQUEST;
+                dispatches.add(DispatcherType.REQUEST);
             }
             if (forwardDispatch) {
-                dispatches |= Handler.FORWARD;
+                dispatches.add(DispatcherType.FORWARD);
             }
             if (includeDispatch) {
-                dispatches |= Handler.INCLUDE;
+                dispatches.add(DispatcherType.INCLUDE);
             }
             if (errorDispatch) {
-                dispatches |= Handler.ERROR;
+                dispatches.add(DispatcherType.ERROR);
             }
 
 
             setFilterName(filterName);
-            setDispatches(dispatches);
+            setDispatcherTypes(dispatches);
             setPathSpecs(urlPatterns);
             if (jettyServletHolders != null) {
                 resetServlets();

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
Wed Feb 11 17:55:06 2009
@@ -101,7 +101,7 @@
      * Service a request with this servlet.  Set the ThreadLocal to hold the
      * current JettyServletHolder.
      */
-    public void handle(ServletRequest request, ServletResponse response)
+    public void handle(Request baseRequest, ServletRequest request, ServletResponse response)
             throws ServletException, UnavailableException, IOException {
 
         //  TODO There has to be some way to get this in on the Servlet's init method.
@@ -110,7 +110,7 @@
         InternalJettyServletHolder.setCurrentServletName(getServletName());
         PolicyContext.setHandlerData(Request.getRequest((HttpServletRequest) request));
 
-        servletHolder.handle(request, response);
+        servletHolder.handle(baseRequest, request, response);
     }
 
     public void doStart() throws Exception {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ComponentContextHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ComponentContextHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ComponentContextHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ComponentContextHandler.java
Wed Feb 11 17:55:06 2009
@@ -41,11 +41,11 @@
         this.componentContext = componentContext;
     }
 
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch) throws IOException, ServletException {
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
         Context oldContext = RootContext.getComponentContext();
         try {
             RootContext.setComponentContext(componentContext);
-            next.handle(target, request, response, dispatch);
+            next.handle(target, request, response);
         } finally {
             RootContext.setComponentContext(oldContext);
         }

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
Wed Feb 11 17:55:06 2009
@@ -23,6 +23,7 @@
 
 import javax.resource.ResourceException;
 import javax.servlet.ServletException;
+import javax.servlet.DispatcherType;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -48,13 +49,14 @@
         this.trackedConnectionAssociator = trackedConnectionAssociator;
     }
 
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch) throws IOException, ServletException {
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+        DispatcherType dispatch = request.getDispatcherType();
         try {
-            if (dispatch == Handler.REQUEST) {
+            if (DispatcherType.REQUEST.equals(dispatch)) {
                 ConnectorInstanceContext oldContext = trackedConnectionAssociator.enter(new
SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources,
false));
 
                 try {
-                    next.handle(target, request, response, dispatch);
+                    next.handle(target, request, response);
                 } finally {
                     trackedConnectionAssociator.exit(oldContext);
                 }
@@ -63,7 +65,7 @@
                 SharedConnectorInstanceContext oldContext = (SharedConnectorInstanceContext)
trackedConnectionAssociator.enter(context);
                 context.share(oldContext);
                 try {
-                    next.handle(target, request, response, dispatch);
+                    next.handle(target, request, response);
                 } finally {
                     context.hide();
                     trackedConnectionAssociator.exit(oldContext);

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
Wed Feb 11 17:55:06 2009
@@ -91,7 +91,7 @@
      *      javax.servlet.http.HttpServletResponse, int)
      */
     public void handle(String target, HttpServletRequest request,
-                       HttpServletResponse response, int dispatch) throws IOException,
+                       HttpServletResponse response) throws IOException,
             ServletException {
         String old_policy_id = PolicyContext.getContextID();
         Callers oldCallers = ContextManager.getCallers();
@@ -100,7 +100,7 @@
             PolicyContext.setContextID(policyContextID);
             PolicyContext.setHandlerData(request);
 
-            super.handle(target, request, response, dispatch);
+            super.handle(target, request, response);
         } finally {
             PolicyContext.setContextID(old_policy_id);
             ContextManager.popCallers(oldCallers);

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ThreadClassloaderHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ThreadClassloaderHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ThreadClassloaderHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/ThreadClassloaderHandler.java
Wed Feb 11 17:55:06 2009
@@ -38,12 +38,12 @@
         this.classLoader = classLoader;
     }
 
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch) throws IOException, ServletException {
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
         Thread thread = Thread.currentThread();
         ClassLoader oldClassLoader = thread.getContextClassLoader();
         thread.setContextClassLoader(classLoader);
         try {
-            next.handle(target, request, response, dispatch);
+            next.handle(target, request, response);
         } finally {
             thread.setContextClassLoader(oldClassLoader);
         }

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
Wed Feb 11 17:55:06 2009
@@ -56,14 +56,14 @@
     }
 
     @Override
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch) throws IOException, ServletException {
-        handler.handle(target, request, response, dispatch);
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+        handler.handle(target, request, response);
     }
 
     private class TwistyHandler implements Handler {
 
-        public void handle(String target, HttpServletRequest request, HttpServletResponse
response, int dispatch) throws IOException, ServletException {
-            TwistyWebAppContext.super.handle(target, request, response, dispatch);
+        public void handle(String target, HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException {
+            TwistyWebAppContext.super.handle(target, request, response);
         }
 
         public void setServer(Server server) {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
Wed Feb 11 17:55:06 2009
@@ -23,6 +23,7 @@
 import java.io.IOException;
 
 import javax.servlet.ServletException;
+import javax.servlet.DispatcherType;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.transaction.Status;
@@ -42,12 +43,13 @@
         this.userTransaction = userTransaction;
     }
 
-    public void handle(String target, HttpServletRequest request, HttpServletResponse response,
int dispatch) throws IOException, ServletException {
+    public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
         boolean active = isActive();
         try {
-            next.handle(target, request, response, dispatch);
+            next.handle(target, request, response);
         } finally {
-             if ((!active && isMarkedRollback()) || (dispatch == REQUEST &&
isActive())) {
+             DispatcherType dispatch = request.getDispatcherType();
+             if ((!active && isMarkedRollback()) || (DispatcherType.REQUEST.equals(dispatch)
&& isActive())) {
                 try {
                     userTransaction.rollback();
                 } catch (SystemException e) {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java?rev=743429&r1=743428&r2=743429&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java
Wed Feb 11 17:55:06 2009
@@ -66,9 +66,9 @@
         public PreHandler createHandler() {
             return new AbstractPreHandler() {
 
-                public void handle(String target, HttpServletRequest request, HttpServletResponse
response, int dispatch)
+                public void handle(String target, HttpServletRequest request, HttpServletResponse
response)
                         throws IOException, ServletException {
-                    next.handle(target, request, response, dispatch);
+                    next.handle(target, request, response);
                 }
 
                 public void addLifeCycleListener(Listener listener) {



Mime
View raw message