You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/11/04 12:54:59 UTC

svn commit: r1636547 [1/2] - in /tomcat/trunk: ./ conf/ java/org/apache/catalina/ java/org/apache/catalina/comet/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/catalina/filters/ java/org/apache/catalina/valves/ java...

Author: markt
Date: Tue Nov  4 11:54:58 2014
New Revision: 1636547

URL: http://svn.apache.org/r1636547
Log:
Remove Comet

Removed:
    tomcat/trunk/java/org/apache/catalina/comet/CometEvent.java
    tomcat/trunk/java/org/apache/catalina/comet/CometFilter.java
    tomcat/trunk/java/org/apache/catalina/comet/CometFilterChain.java
    tomcat/trunk/java/org/apache/catalina/comet/CometProcessor.java
    tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
    tomcat/trunk/java/org/apache/catalina/valves/CometConnectionManagerValve.java
    tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
    tomcat/trunk/webapps/examples/servlets/chat/index.jsp
    tomcat/trunk/webapps/examples/servlets/chat/login.jsp
    tomcat/trunk/webapps/examples/servlets/chat/post.jsp
Modified:
    tomcat/trunk/NOTICE
    tomcat/trunk/TOMCAT-NEXT.txt
    tomcat/trunk/conf/catalina.policy
    tomcat/trunk/conf/context.xml
    tomcat/trunk/java/org/apache/catalina/Globals.java
    tomcat/trunk/java/org/apache/catalina/Valve.java
    tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
    tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
    tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
    tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_es.properties
    tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
    tomcat/trunk/java/org/apache/catalina/connector/Request.java
    tomcat/trunk/java/org/apache/catalina/connector/Response.java
    tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java
    tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java
    tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
    tomcat/trunk/java/org/apache/catalina/core/StandardEngineValve.java
    tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
    tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
    tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java
    tomcat/trunk/java/org/apache/catalina/filters/RemoteAddrFilter.java
    tomcat/trunk/java/org/apache/catalina/filters/RemoteHostFilter.java
    tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java
    tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
    tomcat/trunk/java/org/apache/catalina/valves/LocalStrings_es.properties
    tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java
    tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
    tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
    tomcat/trunk/java/org/apache/coyote/ActionCode.java
    tomcat/trunk/java/org/apache/coyote/Adapter.java
    tomcat/trunk/java/org/apache/coyote/Constants.java
    tomcat/trunk/java/org/apache/coyote/Processor.java
    tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpNio2Protocol.java
    tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java
    tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
    tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
    tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
    tomcat/trunk/webapps/docs/aio.xml
    tomcat/trunk/webapps/docs/changelog.xml
    tomcat/trunk/webapps/docs/config/http.xml
    tomcat/trunk/webapps/examples/WEB-INF/web.xml
    tomcat/trunk/webapps/examples/servlets/index.html

Modified: tomcat/trunk/NOTICE
URL: http://svn.apache.org/viewvc/tomcat/trunk/NOTICE?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/NOTICE (original)
+++ tomcat/trunk/NOTICE Tue Nov  4 11:54:58 2014
@@ -15,13 +15,6 @@ which is open source software.  The orig
 related information is available at
 http://www.eclipse.org.
 
-For the bayeux implementation
-The org.apache.cometd.bayeux API is derivative work originating at the Dojo Foundation
-* Copyright 2007-2008 Guy Molinari
-* Copyright 2007-2008 Filip Hanik
-* Copyright 2007 Dojo Foundation
-* Copyright 2007 Mort Bay Consulting Pty. Ltd.
-
 The original XML Schemas for Java EE Deployment Descriptors:
  - javaee_5.xsd
  - javaee_web_services_1_2.xsd

Modified: tomcat/trunk/TOMCAT-NEXT.txt
URL: http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-NEXT.txt?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/TOMCAT-NEXT.txt (original)
+++ tomcat/trunk/TOMCAT-NEXT.txt Tue Nov  4 11:54:58 2014
@@ -21,7 +21,8 @@ Notes of things to consider for the next
 
  2. Remove BIO AJP and HTTP connector.
 
- 3. Remove Comet support.
+ 3. DONE.
+    Remove Comet support.
 
  4. Refactor the connectors to minimise code duplication
     - All implementation specific per connector code -> Endpoint

Modified: tomcat/trunk/conf/catalina.policy
URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.policy?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/conf/catalina.policy (original)
+++ tomcat/trunk/conf/catalina.policy Tue Nov  4 11:54:58 2014
@@ -186,9 +186,6 @@ grant {
     permission java.util.PropertyPermission
      "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
 
-    // Applications using Comet need to be able to access this package
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet";
-
     // Applications using WebSocket need to be able to access these packages
     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";

Modified: tomcat/trunk/conf/context.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/context.xml?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/conf/context.xml (original)
+++ tomcat/trunk/conf/context.xml Tue Nov  4 11:54:58 2014
@@ -27,10 +27,4 @@
     <!--
     <Manager pathname="" />
     -->
-
-    <!-- Uncomment this to enable Comet connection tacking (provides events
-         on session expiration as well as webapp lifecycle) -->
-    <!--
-    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-    -->
 </Context>

Modified: tomcat/trunk/java/org/apache/catalina/Globals.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Globals.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Globals.java Tue Nov  4 11:54:58 2014
@@ -138,41 +138,6 @@ public final class Globals {
 
     /**
      * The request attribute that is set to the value of {@code Boolean.TRUE}
-     * if connector processing this request supports Comet API.
-     * Duplicated here for neater code in the catalina packages.
-     */
-    public static final String COMET_SUPPORTED_ATTR =
-        org.apache.coyote.Constants.COMET_SUPPORTED_ATTR;
-
-
-    /**
-     * The request attribute that is set to the value of {@code Boolean.TRUE}
-     * if connector processing this request supports setting
-     * per-connection request timeout through Comet API.
-     *
-     * @see org.apache.catalina.comet.CometEvent#setTimeout(int)
-     *
-     * Duplicated here for neater code in the catalina packages.
-     */
-    public static final String COMET_TIMEOUT_SUPPORTED_ATTR =
-            org.apache.coyote.Constants.COMET_TIMEOUT_SUPPORTED_ATTR;
-
-
-    /**
-     * The request attribute that can be set to a value of type
-     * {@code java.lang.Integer} to specify per-connection request
-     * timeout for Comet API. The value is in milliseconds.
-     *
-     * @see org.apache.catalina.comet.CometEvent#setTimeout(int)
-     *
-     * Duplicated here for neater code in the catalina packages.
-     */
-    public static final String COMET_TIMEOUT_ATTR =
-        org.apache.coyote.Constants.COMET_TIMEOUT_ATTR;
-
-
-    /**
-     * The request attribute that is set to the value of {@code Boolean.TRUE}
      * if connector processing this request supports use of sendfile.
      *
      * Duplicated here for neater code in the catalina packages.

Modified: tomcat/trunk/java/org/apache/catalina/Valve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Valve.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Valve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Valve.java Tue Nov  4 11:54:58 2014
@@ -14,20 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina;
 
-
 import java.io.IOException;
 
 import javax.servlet.ServletException;
 
-import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 
-
 /**
  * <p>A <b>Valve</b> is a request processing component associated with a
  * particular Container.  A series of Valves are generally associated with
@@ -123,22 +118,5 @@ public interface Valve {
         throws IOException, ServletException;
 
 
-    /**
-     * Process a Comet event.
-     *
-     * @param request The servlet request to be processed
-     * @param response The servlet response to be created
-     *
-     * @exception IOException if an input/output error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     * @exception ServletException if a servlet error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     */
-    public void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException;
-
-
     public boolean isAsyncSupported();
-
-
 }

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue Nov  4 11:54:58 2014
@@ -31,8 +31,6 @@ import javax.servlet.http.HttpServletRes
 import org.apache.catalina.Context;
 import org.apache.catalina.Host;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometEvent.EventType;
 import org.apache.catalina.core.AsyncContextImpl;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.SessionConfig;
@@ -147,135 +145,6 @@ public class CoyoteAdapter implements Ad
 
     // -------------------------------------------------------- Adapter Methods
 
-
-    /**
-     * Event method.
-     *
-     * @return false to indicate an error, expected or not
-     */
-    @Override
-    public boolean event(org.apache.coyote.Request req,
-            org.apache.coyote.Response res, SocketStatus status) {
-
-        Request request = (Request) req.getNote(ADAPTER_NOTES);
-        Response response = (Response) res.getNote(ADAPTER_NOTES);
-
-        if (request.getWrapper() == null) {
-            return false;
-        }
-
-        boolean error = false;
-        boolean read = false;
-        try {
-            if (status == SocketStatus.OPEN_READ) {
-                if (response.isClosed()) {
-                    // The event has been closed asynchronously, so call end instead of
-                    // read to cleanup the pipeline
-                    request.getEvent().setEventType(CometEvent.EventType.END);
-                    request.getEvent().setEventSubType(null);
-                } else {
-                    try {
-                        // Fill the read buffer of the servlet layer
-                        if (request.read()) {
-                            read = true;
-                        }
-                    } catch (IOException e) {
-                        error = true;
-                    }
-                    if (read) {
-                        request.getEvent().setEventType(CometEvent.EventType.READ);
-                        request.getEvent().setEventSubType(null);
-                    } else if (error) {
-                        request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                        request.getEvent().setEventSubType(CometEvent.EventSubType.CLIENT_DISCONNECT);
-                    } else {
-                        request.getEvent().setEventType(CometEvent.EventType.END);
-                        request.getEvent().setEventSubType(null);
-                    }
-                }
-            } else if (status == SocketStatus.DISCONNECT) {
-                request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                request.getEvent().setEventSubType(CometEvent.EventSubType.CLIENT_DISCONNECT);
-                error = true;
-            } else if (status == SocketStatus.ERROR) {
-                request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                request.getEvent().setEventSubType(CometEvent.EventSubType.IOEXCEPTION);
-                error = true;
-            } else if (status == SocketStatus.STOP) {
-                request.getEvent().setEventType(CometEvent.EventType.END);
-                request.getEvent().setEventSubType(CometEvent.EventSubType.SERVER_SHUTDOWN);
-            } else if (status == SocketStatus.TIMEOUT) {
-                if (response.isClosed()) {
-                    // The event has been closed asynchronously, so call end instead of
-                    // read to cleanup the pipeline
-                    request.getEvent().setEventType(CometEvent.EventType.END);
-                    request.getEvent().setEventSubType(null);
-                } else {
-                    request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                    request.getEvent().setEventSubType(CometEvent.EventSubType.TIMEOUT);
-                }
-            }
-
-            req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
-
-            // Calling the container
-            connector.getService().getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
-
-            if (!error && !response.isClosed() && (request.getAttribute(
-                    RequestDispatcher.ERROR_EXCEPTION) != null)) {
-                // An unexpected exception occurred while processing the event, so
-                // error should be called
-                request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                request.getEvent().setEventSubType(null);
-                error = true;
-                connector.getService().getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
-            }
-            if (response.isClosed() || !request.isComet()) {
-                if (status==SocketStatus.OPEN_READ &&
-                        request.getEvent().getEventType() != EventType.END) {
-                    //CometEvent.close was called during an event other than END
-                    request.getEvent().setEventType(CometEvent.EventType.END);
-                    request.getEvent().setEventSubType(null);
-                    error = true;
-                    connector.getService().getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
-                }
-                res.action(ActionCode.COMET_END, null);
-            } else if (!error && read && request.getAvailable()) {
-                // If this was a read and not all bytes have been read, or if no data
-                // was read from the connector, then it is an error
-                request.getEvent().setEventType(CometEvent.EventType.ERROR);
-                request.getEvent().setEventSubType(CometEvent.EventSubType.IOEXCEPTION);
-                error = true;
-                connector.getService().getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
-            }
-            return (!error);
-        } catch (Throwable t) {
-            ExceptionUtils.handleThrowable(t);
-            if (!(t instanceof IOException)) {
-                log.error(sm.getString("coyoteAdapter.service"), t);
-            }
-            error = true;
-            return false;
-        } finally {
-            req.getRequestProcessor().setWorkerThreadName(null);
-            // Recycle the wrapper request and response
-            if (error || response.isClosed() || !request.isComet()) {
-                if (request.getMappingData().context != null) {
-                    request.getMappingData().context.logAccess(
-                            request, response,
-                            System.currentTimeMillis() - req.getStartTime(),
-                            false);
-                } else {
-                    // Should normally not happen
-                    log(req, res, System.currentTimeMillis() - req.getStartTime());
-                }
-                request.recycle();
-                request.setFilterChain(null);
-                response.recycle();
-            }
-        }
-    }
-
     @Override
     public boolean asyncDispatch(org.apache.coyote.Request req,
             org.apache.coyote.Response res, SocketStatus status) throws Exception {
@@ -286,12 +155,11 @@ public class CoyoteAdapter implements Ad
             throw new IllegalStateException(
                     "Dispatch may only happen on an existing request.");
         }
-        boolean comet = false;
         boolean success = true;
         AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext();
         req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
         try {
-            if (!request.isAsync() && !comet) {
+            if (!request.isAsync()) {
                 // Error or timeout - need to tell listeners the request is over
                 // Have to test this first since state may change while in this
                 // method and this is only required if entering this method in
@@ -414,25 +282,7 @@ public class CoyoteAdapter implements Ad
                 }
             }
 
-            if (request.isComet()) {
-                if (!response.isClosed() && !response.isError()) {
-                    if (request.getAvailable() || (request.getContentLength() > 0 && (!request.isParametersParsed()))) {
-                        // Invoke a read event right away if there are available bytes
-                        if (event(req, res, SocketStatus.OPEN_READ)) {
-                            comet = true;
-                            res.action(ActionCode.COMET_BEGIN, null);
-                        }
-                    } else {
-                        comet = true;
-                        res.action(ActionCode.COMET_BEGIN, null);
-                    }
-                } else {
-                    // Clear the filter chain, as otherwise it will not be reset elsewhere
-                    // since this is a Comet request
-                    request.setFilterChain(null);
-                }
-            }
-            if (!request.isAsync() && !comet) {
+            if (!request.isAsync()) {
                 request.finishRequest();
                 response.finishResponse();
                 if (request.getMappingData().context != null) {
@@ -471,7 +321,7 @@ public class CoyoteAdapter implements Ad
             }
             req.getRequestProcessor().setWorkerThreadName(null);
             // Recycle the wrapper request and response
-            if (!success || (!comet && !request.isAsync())) {
+            if (!success || !request.isAsync()) {
                 request.recycle();
                 response.recycle();
             } else {
@@ -521,7 +371,6 @@ public class CoyoteAdapter implements Ad
             response.addHeader("X-Powered-By", POWERED_BY);
         }
 
-        boolean comet = false;
         boolean async = false;
 
         try {
@@ -535,26 +384,6 @@ public class CoyoteAdapter implements Ad
                 request.setAsyncSupported(connector.getService().getContainer().getPipeline().isAsyncSupported());
                 // Calling the container
                 connector.getService().getContainer().getPipeline().getFirst().invoke(request, response);
-
-                if (request.isComet()) {
-                    if (!response.isClosed() && !response.isError()) {
-                        if (request.getAvailable() || (request.getContentLength() > 0 && (!request.isParametersParsed()))) {
-                            // Invoke a read event right away if there are available bytes
-                            if (event(req, res, SocketStatus.OPEN_READ)) {
-                                comet = true;
-                                res.action(ActionCode.COMET_BEGIN, null);
-                            }
-                        } else {
-                            comet = true;
-                            res.action(ActionCode.COMET_BEGIN, null);
-                        }
-                    } else {
-                        // Clear the filter chain, as otherwise it will not be reset elsewhere
-                        // since this is a Comet request
-                        request.setFilterChain(null);
-                    }
-                }
-
             }
             AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext();
             if (asyncConImpl != null) {
@@ -573,15 +402,12 @@ public class CoyoteAdapter implements Ad
                         request.getContext().unbind(false, oldCL);
                     }
                 }
-            } else if (!comet) {
+            } else {
                 request.finishRequest();
                 response.finishResponse();
-                if (postParseSuccess &&
-                        request.getMappingData().context != null) {
+                if (postParseSuccess) {
                     // Log only if processing was invoked.
                     // If postParseRequest() failed, it has already logged it.
-                    // If context is null this was the start of a comet request
-                    // that failed and has already been logged.
                     request.getMappingData().context.logAccess(
                             request, response,
                             System.currentTimeMillis() - req.getStartTime(),
@@ -596,7 +422,7 @@ public class CoyoteAdapter implements Ad
             AtomicBoolean error = new AtomicBoolean(false);
             res.action(ActionCode.IS_ERROR, error);
             // Recycle the wrapper request and response
-            if (!comet && !async || error.get()) {
+            if (!async || error.get()) {
                 request.recycle();
                 response.recycle();
             } else {

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Tue Nov  4 11:54:58 2014
@@ -214,7 +214,7 @@ public class InputBuffer extends Reader
 
 
     /**
-     * Clear cached encoders (to save memory for Comet requests).
+     * Clear cached encoders (to save memory for async requests).
      */
     public void clearEncoders() {
         encoders.clear();

Modified: tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties Tue Nov  4 11:54:58 2014
@@ -12,9 +12,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-cometEvent.nullRequest=The event object has been recycled and is no longer associated with a request
-
 coyoteAdapter.accesslogFail=Exception while attempting to add an entry to the access log
 coyoteAdapter.asyncDispatch=Exception while processing an asynchronous request
 coyoteAdapter.checkRecycled.request=Encountered a non-recycled request and recycled it forcedly.

Modified: tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_es.properties?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_es.properties Tue Nov  4 11:54:58 2014
@@ -51,7 +51,6 @@ coyoteRequest.uploadLocationInvalid = No
 coyoteRequest.sessionEndAccessFail = Excepci\u00F3n disparada acabando acceso a sesi\u00F3n mientras se reciclaba el requerimiento
 requestFacade.nullRequest = El objeto de requerimiento ha sido reciclado y ya no est\u00E1 asociado con esta fachada
 responseFacade.nullResponse = El objeto de respuesta ha sido reciclado y ya no est\u00E1 asociado con esta fachada
-cometEvent.nullRequest = El objeto de evento ha sido reciclado y ya no est\u00E1 asociado con este requerimiento
 mapperListener.unknownDefaultHost = M\u00E1quina por defecto desconocida\: {0} para el conector [{1}]
 mapperListener.registerHost = Registrar m\u00E1quina {0} en dominio {1} para el conector [{2}]
 mapperListener.unregisterHost = Desregistrar m\u00E1quina {0} en dominio {1} para el conector [{2}]

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Tue Nov  4 11:54:58 2014
@@ -249,7 +249,7 @@ public class OutputBuffer extends Writer
 
 
     /**
-     * Clear cached encoders (to save memory for Comet requests).
+     * Clear cached encoders (to save memory for async requests).
      */
     public void clearEncoders() {
         encoders.clear();

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Nov  4 11:54:58 2014
@@ -223,18 +223,6 @@ public class Request
 
 
     /**
-     * Associated event.
-     */
-    protected CometEventImpl event = null;
-
-
-    /**
-     * Comet state
-     */
-    protected boolean comet = false;
-
-
-    /**
      * The current dispatcher type.
      */
     protected DispatcherType internalDispatcherType = null;
@@ -446,12 +434,6 @@ public class Request
         internalDispatcherType = null;
         requestDispatcherPath = null;
 
-        comet = false;
-        if (event != null) {
-            event.clear();
-            event = null;
-        }
-
         authType = null;
         inputBuffer.recycle();
         usingInputStream = false;
@@ -534,7 +516,7 @@ public class Request
     }
 
     /**
-     * Clear cached encoders (to save memory for Comet requests).
+     * Clear cached encoders (to save memory for async requests).
      */
     public void clearEncoders() {
         inputBuffer.clearEncoders();
@@ -542,7 +524,7 @@ public class Request
 
 
     /**
-     * Clear cached encoders (to save memory for Comet requests).
+     * Clear cached encoders (to save memory for async requests).
      */
     public boolean read()
         throws IOException {
@@ -949,8 +931,6 @@ public class Request
      * have names starting with "org.apache.tomcat" and include:
      * <ul>
      * <li>{@link Globals#SENDFILE_SUPPORTED_ATTR}</li>
-     * <li>{@link Globals#COMET_SUPPORTED_ATTR}</li>
-     * <li>{@link Globals#COMET_TIMEOUT_SUPPORTED_ATTR}</li>
      * </ul>
      * Connector implementations may return some, all or none of these
      * attributes and may also support additional attributes.
@@ -2455,33 +2435,6 @@ public class Request
 
 
     /**
-     * Get the event associated with the request.
-     * @return the event
-     */
-    public CometEventImpl getEvent() {
-        if (event == null) {
-            event = new CometEventImpl(this, response);
-        }
-        return event;
-    }
-
-
-    /**
-     * Return true if the current request is handling Comet traffic.
-     */
-    public boolean isComet() {
-        return comet;
-    }
-
-
-    /**
-     * Set comet state.
-     */
-    public void setComet(boolean comet) {
-        this.comet = comet;
-    }
-
-    /**
      * return true if we have parsed parameters
      */
     public boolean isParametersParsed() {
@@ -2515,15 +2468,6 @@ public class Request
         }
     }
 
-    public void cometClose() {
-        coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent());
-        setComet(false);
-    }
-
-    public void setCometTimeout(long timeout) {
-        coyoteRequest.action(ActionCode.COMET_SETTIMEOUT, Long.valueOf(timeout));
-    }
-
     /**
      * @throws IOException If an I/O error occurs
      * @throws IllegalStateException If the response has been committed
@@ -3286,32 +3230,6 @@ public class Request
                         // NO-OP
                     }
                 });
-        specialAttributes.put(Globals.COMET_SUPPORTED_ATTR,
-                new SpecialAttributeAdapter() {
-                    @Override
-                    public Object get(Request request, String name) {
-                        return Boolean.valueOf(
-                                request.getConnector().getProtocolHandler(
-                                        ).isCometSupported());
-                    }
-                    @Override
-                    public void set(Request request, String name, Object value) {
-                        // NO-OP
-                    }
-                });
-        specialAttributes.put(Globals.COMET_TIMEOUT_SUPPORTED_ATTR,
-                new SpecialAttributeAdapter() {
-                    @Override
-                    public Object get(Request request, String name) {
-                        return Boolean.valueOf(
-                                request.getConnector().getProtocolHandler(
-                                        ).isCometTimeoutSupported());
-                    }
-                    @Override
-                    public void set(Request request, String name, Object value) {
-                        // NO-OP
-                    }
-                });
         specialAttributes.put(Globals.SENDFILE_SUPPORTED_ATTR,
                 new SpecialAttributeAdapter() {
                     @Override

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Tue Nov  4 11:54:58 2014
@@ -289,7 +289,7 @@ public class Response
 
 
     /**
-     * Clear cached encoders (to save memory for Comet requests).
+     * Clear cached encoders (to save memory for async requests).
      */
     public void clearEncoders() {
         outputBuffer.clearEncoders();

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java Tue Nov  4 11:54:58 2014
@@ -14,11 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina.core;
 
-
 import java.io.IOException;
 import java.security.Principal;
 import java.security.PrivilegedActionException;
@@ -34,10 +31,6 @@ import javax.servlet.http.HttpServletRes
 
 import org.apache.catalina.Globals;
 import org.apache.catalina.InstanceEvent;
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometFilter;
-import org.apache.catalina.comet.CometFilterChain;
-import org.apache.catalina.comet.CometProcessor;
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.catalina.util.InstanceSupport;
 import org.apache.tomcat.util.ExceptionUtils;
@@ -52,7 +45,7 @@ import org.apache.tomcat.util.res.String
  *
  * @author Craig R. McClanahan
  */
-final class ApplicationFilterChain implements FilterChain, CometFilterChain {
+final class ApplicationFilterChain implements FilterChain {
 
     // Used to enforce requirements of SRV.8.2 / SRV.14.2.5.1
     private static final ThreadLocal<ServletRequest> lastServicedRequest;
@@ -144,24 +137,9 @@ final class ApplicationFilterChain imple
     private static final Class<?>[] classTypeUsedInService = new Class[]{
         ServletRequest.class, ServletResponse.class};
 
-    /**
-     * Static class array used when the SecurityManager is turned on and
-     * <code>doFilterEvent</code> is invoked.
-     */
-    private static final Class<?>[] cometClassType =
-        new Class[]{ CometEvent.class, CometFilterChain.class};
-
-    /**
-     * Static class array used when the SecurityManager is turned on and
-     * <code>event</code> is invoked.
-     */
-    private static final Class<?>[] classTypeUsedInEvent =
-        new Class[] { CometEvent.class };
-
 
     // ---------------------------------------------------- FilterChain Methods
 
-
     /**
      * Invoke the next filter in this chain, passing the specified request
      * and response.  If there are no more filters in this chain, invoke
@@ -324,48 +302,6 @@ final class ApplicationFilterChain imple
 
 
     /**
-     * Process the event, using the security manager if the option is enabled.
-     *
-     * @param event the event to process
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet exception occurs
-     */
-    @Override
-    public void doFilterEvent(CometEvent event)
-        throws IOException, ServletException {
-
-        if( Globals.IS_SECURITY_ENABLED ) {
-            final CometEvent ev = event;
-            try {
-                java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction<Void>() {
-                        @Override
-                        public Void run()
-                            throws ServletException, IOException {
-                            internalDoFilterEvent(ev);
-                            return null;
-                        }
-                    }
-                );
-            } catch( PrivilegedActionException pe) {
-                Exception e = pe.getException();
-                if (e instanceof ServletException)
-                    throw (ServletException) e;
-                else if (e instanceof IOException)
-                    throw (IOException) e;
-                else if (e instanceof RuntimeException)
-                    throw (RuntimeException) e;
-                else
-                    throw new ServletException(e.getMessage(), e);
-            }
-        } else {
-            internalDoFilterEvent(event);
-        }
-    }
-
-
-    /**
      * The last request passed to a servlet for servicing from the current
      * thread.
      *
@@ -387,125 +323,8 @@ final class ApplicationFilterChain imple
     }
 
 
-    private void internalDoFilterEvent(CometEvent event)
-        throws IOException, ServletException {
-
-        // Call the next filter if there is one
-        if (pos < n) {
-            ApplicationFilterConfig filterConfig = filters[pos++];
-            CometFilter filter = null;
-            try {
-                filter = (CometFilter) filterConfig.getFilter();
-                // FIXME: No instance listener processing for events for now
-                /*
-                support.fireInstanceEvent(InstanceEvent.BEFORE_FILTER_EVENT,
-                        filter, event);
-                        */
-
-                if( Globals.IS_SECURITY_ENABLED ) {
-                    final CometEvent ev = event;
-                    Principal principal =
-                        ev.getHttpServletRequest().getUserPrincipal();
-
-                    Object[] args = new Object[]{ev, this};
-                    SecurityUtil.doAsPrivilege("doFilterEvent", filter,
-                            cometClassType, args, principal);
-
-                } else {
-                    filter.doFilterEvent(event, this);
-                }
-
-                /*support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
-                        filter, event);*/
-            } catch (IOException e) {
-                /*
-                if (filter != null)
-                    support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
-                            filter, event, e);
-                            */
-                throw e;
-            } catch (ServletException e) {
-                /*
-                if (filter != null)
-                    support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
-                            filter, event, e);
-                            */
-                throw e;
-            } catch (RuntimeException e) {
-                /*
-                if (filter != null)
-                    support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
-                            filter, event, e);
-                            */
-                throw e;
-            } catch (Throwable e) {
-                e = ExceptionUtils.unwrapInvocationTargetException(e);
-                ExceptionUtils.handleThrowable(e);
-                /*if (filter != null)
-                    support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
-                            filter, event, e);*/
-                throw new ServletException
-                    (sm.getString("filterChain.filter"), e);
-            }
-            return;
-        }
-
-        // We fell off the end of the chain -- call the servlet instance
-        try {
-            /*
-            support.fireInstanceEvent(InstanceEvent.BEFORE_SERVICE_EVENT,
-                    servlet, request, response);
-                    */
-            if( Globals.IS_SECURITY_ENABLED ) {
-                final CometEvent ev = event;
-                Principal principal =
-                    ev.getHttpServletRequest().getUserPrincipal();
-                Object[] args = new Object[]{ ev };
-                SecurityUtil.doAsPrivilege("event",
-                        servlet,
-                        classTypeUsedInEvent,
-                        args,
-                        principal);
-            } else {
-                ((CometProcessor) servlet).event(event);
-            }
-            /*
-            support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
-                    servlet, request, response);*/
-        } catch (IOException e) {
-            /*
-            support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
-                    servlet, request, response, e);
-                    */
-            throw e;
-        } catch (ServletException e) {
-            /*
-            support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
-                    servlet, request, response, e);
-                    */
-            throw e;
-        } catch (RuntimeException e) {
-            /*
-            support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
-                    servlet, request, response, e);
-                    */
-            throw e;
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            /*
-            support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
-                    servlet, request, response, e);
-                    */
-            throw new ServletException
-                (sm.getString("filterChain.servlet"), e);
-        }
-
-    }
-
-
     // -------------------------------------------------------- Package Methods
 
-
     /**
      * Add a filter to the set of filters that will be executed in this chain.
      *

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java Tue Nov  4 11:54:58 2014
@@ -22,9 +22,7 @@ import javax.servlet.ServletRequest;
 
 import org.apache.catalina.Globals;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.comet.CometFilter;
 import org.apache.catalina.connector.Request;
-import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.descriptor.web.FilterMap;
 
 /**
@@ -87,19 +85,13 @@ public final class ApplicationFilterFact
         if (servlet == null)
             return (null);
 
-        boolean comet = false;
-
         // Create and initialize a filter chain object
         ApplicationFilterChain filterChain = null;
         if (request instanceof Request) {
             Request req = (Request) request;
-            comet = req.isComet();
             if (Globals.IS_SECURITY_ENABLED) {
                 // Security: Do not recycle
                 filterChain = new ApplicationFilterChain();
-                if (comet) {
-                    req.setFilterChain(filterChain);
-                }
             } else {
                 filterChain = (ApplicationFilterChain) req.getFilterChain();
                 if (filterChain == null) {
@@ -141,23 +133,7 @@ public final class ApplicationFilterFact
                 // FIXME - log configuration problem
                 continue;
             }
-            boolean isCometFilter = false;
-            if (comet) {
-                try {
-                    isCometFilter = filterConfig.getFilter() instanceof CometFilter;
-                } catch (Exception e) {
-                    // Note: The try catch is there because getFilter has a lot of
-                    // declared exceptions. However, the filter is allocated much
-                    // earlier
-                    Throwable t = ExceptionUtils.unwrapInvocationTargetException(e);
-                    ExceptionUtils.handleThrowable(t);
-                }
-                if (isCometFilter) {
-                    filterChain.addFilter(filterConfig);
-                }
-            } else {
-                filterChain.addFilter(filterConfig);
-            }
+            filterChain.addFilter(filterConfig);
         }
 
         // Add filters that match on servlet name second
@@ -173,26 +149,11 @@ public final class ApplicationFilterFact
                 // FIXME - log configuration problem
                 continue;
             }
-            boolean isCometFilter = false;
-            if (comet) {
-                try {
-                    isCometFilter = filterConfig.getFilter() instanceof CometFilter;
-                } catch (Exception e) {
-                    // Note: The try catch is there because getFilter has a lot of
-                    // declared exceptions. However, the filter is allocated much
-                    // earlier
-                }
-                if (isCometFilter) {
-                    filterChain.addFilter(filterConfig);
-                }
-            } else {
-                filterChain.addFilter(filterConfig);
-            }
+            filterChain.addFilter(filterConfig);
         }
 
         // Return the completed filter chain
-        return (filterChain);
-
+        return filterChain;
     }
 
 

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java Tue Nov  4 11:54:58 2014
@@ -24,7 +24,6 @@ import javax.servlet.http.HttpServletRes
 
 import org.apache.catalina.Container;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.valves.ValveBase;
@@ -105,27 +104,4 @@ final class StandardContextValve extends
         }
         wrapper.getPipeline().getFirst().invoke(request, response);
     }
-
-
-    /**
-     * Select the appropriate child Wrapper to process this request,
-     * based on the specified request URI.  If no matching Wrapper can
-     * be found, return an appropriate HTTP error.
-     *
-     * @param request Request to be processed
-     * @param response Response to be produced
-     * @param event
-     *
-     * @exception IOException if an input/output error occurred
-     * @exception ServletException if a servlet error occurred
-     */
-    @Override
-    public final void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException {
-
-        // Select the Wrapper to be used for this Request
-        Wrapper wrapper = request.getWrapper();
-
-        wrapper.getPipeline().getFirst().event(request, response, event);
-    }
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngineValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngineValve.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardEngineValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardEngineValve.java Tue Nov  4 11:54:58 2014
@@ -22,7 +22,6 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Host;
-import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.valves.ValveBase;
@@ -88,25 +87,4 @@ final class StandardEngineValve extends 
         host.getPipeline().getFirst().invoke(request, response);
 
     }
-
-
-    /**
-     * Process Comet event.
-     *
-     * @param request Request to be processed
-     * @param response Response to be produced
-     * @param event the event
-     *
-     * @exception IOException if an input/output error occurred
-     * @exception ServletException if a servlet error occurred
-     */
-    @Override
-    public final void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException {
-
-        // Ask this Host to process this request
-        request.getHost().getPipeline().getFirst().event(request, response, event);
-
-    }
-
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java Tue Nov  4 11:54:58 2014
@@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletRes
 import org.apache.catalina.Context;
 import org.apache.catalina.Globals;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.connector.ClientAbortException;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
@@ -192,52 +191,6 @@ final class StandardHostValve extends Va
     }
 
 
-    /**
-     * Process Comet event.
-     *
-     * @param request Request to be processed
-     * @param response Response to be produced
-     * @param event the event
-     *
-     * @exception IOException if an input/output error occurred
-     * @exception ServletException if a servlet error occurred
-     */
-    @Override
-    public final void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException {
-
-        // Select the Context to be used for this Request
-        Context context = request.getContext();
-
-        context.bind(false, MY_CLASSLOADER);
-
-        // Ask this Context to process this request
-        context.getPipeline().getFirst().event(request, response, event);
-
-
-        // Error page processing
-        response.setSuspended(false);
-
-        Throwable t = (Throwable) request.getAttribute(
-                RequestDispatcher.ERROR_EXCEPTION);
-
-        if (t != null) {
-            throwable(request, response, t);
-        } else {
-            status(request, response);
-        }
-
-        // Access a session (if present) to update last accessed time, based on a
-        // strict interpretation of the specification
-        if (ACCESS_SESSION) {
-            request.getSession(false);
-        }
-
-        // Restore the context classloader
-        context.unbind(false, MY_CLASSLOADER);
-    }
-
-
     // -------------------------------------------------------- Private Methods
 
     /**

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java Tue Nov  4 11:54:58 2014
@@ -32,8 +32,6 @@ import javax.servlet.http.HttpServletRes
 import org.apache.catalina.Context;
 import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometProcessor;
 import org.apache.catalina.connector.ClientAbortException;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
@@ -163,14 +161,6 @@ final class StandardWrapperValve
             servlet = null;
         }
 
-        // Identify if the request is Comet related now that the servlet has been allocated
-        boolean comet = false;
-        if (servlet instanceof CometProcessor && request.getAttribute(
-                Globals.COMET_SUPPORTED_ATTR) == Boolean.TRUE) {
-            comet = true;
-            request.setComet(true);
-        }
-
         MessageBytes requestPathMB = request.getRequestPathMB();
         DispatcherType dispatcherType = DispatcherType.REQUEST;
         if (request.getDispatcherType()==DispatcherType.ASYNC) dispatcherType = DispatcherType.ASYNC;
@@ -183,9 +173,6 @@ final class StandardWrapperValve
         ApplicationFilterChain filterChain =
             factory.createFilterChain(request, wrapper, servlet);
 
-        // Reset comet flag value after creating the filter chain
-        request.setComet(false);
-
         // Call the filter chain for this request
         // NOTE: This also calls the servlet's service() method
         try {
@@ -196,9 +183,6 @@ final class StandardWrapperValve
                         SystemLogHandler.startCapture();
                         if (request.isAsyncDispatching()) {
                             ((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();
-                        } else if (comet) {
-                            filterChain.doFilterEvent(request.getEvent());
-                            request.setComet(true);
                         } else {
                             filterChain.doFilter(request.getRequest(),
                                     response.getResponse());
@@ -212,9 +196,6 @@ final class StandardWrapperValve
                 } else {
                     if (request.isAsyncDispatching()) {
                         ((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();
-                    } else if (comet) {
-                        request.setComet(true);
-                        filterChain.doFilterEvent(request.getEvent());
                     } else {
                         filterChain.doFilter
                             (request.getRequest(), response.getResponse());
@@ -272,180 +253,7 @@ final class StandardWrapperValve
 
         // Release the filter chain (if any) for this request
         if (filterChain != null) {
-            if (request.isComet()) {
-                // If this is a Comet request, then the same chain will be used for the
-                // processing of all subsequent events.
-                filterChain.reuse();
-            } else {
-                filterChain.release();
-            }
-        }
-
-        // Deallocate the allocated servlet instance
-        try {
-            if (servlet != null) {
-                wrapper.deallocate(servlet);
-            }
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            container.getLogger().error(sm.getString("standardWrapper.deallocateException",
-                             wrapper.getName()), e);
-            if (throwable == null) {
-                throwable = e;
-                exception(request, response, e);
-            }
-        }
-
-        // If this servlet has been marked permanently unavailable,
-        // unload it and release this instance
-        try {
-            if ((servlet != null) &&
-                (wrapper.getAvailable() == Long.MAX_VALUE)) {
-                wrapper.unload();
-            }
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            container.getLogger().error(sm.getString("standardWrapper.unloadException",
-                             wrapper.getName()), e);
-            if (throwable == null) {
-                throwable = e;
-                exception(request, response, e);
-            }
-        }
-        long t2=System.currentTimeMillis();
-
-        long time=t2-t1;
-        processingTime += time;
-        if( time > maxTime) maxTime=time;
-        if( time < minTime) minTime=time;
-
-    }
-
-
-    /**
-     * Process a Comet event. The main differences here are to not use sendError
-     * (the response is committed), to avoid creating a new filter chain
-     * (which would work but be pointless), and a few very minor tweaks.
-     *
-     * @param request The servlet request to be processed
-     * @param response The servlet response to be created
-     *
-     * @exception IOException if an input/output error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     * @exception ServletException if a servlet error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     */
-    @Override
-    public void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException {
-
-        // Initialize local variables we may need
-        Throwable throwable = null;
-        // This should be a Request attribute...
-        long t1=System.currentTimeMillis();
-        // FIXME: Add a flag to count the total amount of events processed ? requestCount++;
-
-        StandardWrapper wrapper = (StandardWrapper) getContainer();
-        if (wrapper == null) {
-            // Context has been shutdown. Nothing to do here.
-            return;
-        }
-
-        Servlet servlet = null;
-        Context context = (Context) wrapper.getParent();
-
-        // Check for the application being marked unavailable
-        boolean unavailable = !context.getState().isAvailable() ||
-                wrapper.isUnavailable();
-
-        // Allocate a servlet instance to process this request
-        try {
-            if (!unavailable) {
-                servlet = wrapper.allocate();
-            }
-        } catch (UnavailableException e) {
-            // The response is already committed, so it's not possible to do anything
-        } catch (ServletException e) {
-            container.getLogger().error(sm.getString("standardWrapper.allocateException",
-                             wrapper.getName()), StandardWrapper.getRootCause(e));
-            throwable = e;
-            exception(request, response, e);
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            container.getLogger().error(sm.getString("standardWrapper.allocateException",
-                             wrapper.getName()), e);
-            throwable = e;
-            exception(request, response, e);
-            servlet = null;
-        }
-
-        MessageBytes requestPathMB = request.getRequestPathMB();
-        request.setAttribute(Globals.DISPATCHER_TYPE_ATTR,
-                DispatcherType.REQUEST);
-        request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR,
-                requestPathMB);
-        // Get the current (unchanged) filter chain for this request
-        ApplicationFilterChain filterChain =
-            (ApplicationFilterChain) request.getFilterChain();
-
-        // Call the filter chain for this request
-        // NOTE: This also calls the servlet's event() method
-        try {
-            if ((servlet != null) && (filterChain != null)) {
-
-                // Swallow output if needed
-                if (context.getSwallowOutput()) {
-                    try {
-                        SystemLogHandler.startCapture();
-                        filterChain.doFilterEvent(request.getEvent());
-                    } finally {
-                        String log = SystemLogHandler.stopCapture();
-                        if (log != null && log.length() > 0) {
-                            context.getLogger().info(log);
-                        }
-                    }
-                } else {
-                    filterChain.doFilterEvent(request.getEvent());
-                }
-
-            }
-        } catch (ClientAbortException e) {
-            throwable = e;
-            exception(request, response, e);
-        } catch (IOException e) {
-            container.getLogger().error(sm.getString(
-                    "standardWrapper.serviceException", wrapper.getName(),
-                    context.getName()), e);
-            throwable = e;
-            exception(request, response, e);
-        } catch (UnavailableException e) {
-            container.getLogger().error(sm.getString(
-                    "standardWrapper.serviceException", wrapper.getName(),
-                    context.getName()), e);
-            // Do not save exception in 'throwable', because we
-            // do not want to do exception(request, response, e) processing
-        } catch (ServletException e) {
-            Throwable rootCause = StandardWrapper.getRootCause(e);
-            if (!(rootCause instanceof ClientAbortException)) {
-                container.getLogger().error(sm.getString(
-                        "standardWrapper.serviceExceptionRoot",
-                        wrapper.getName(), context.getName(), e.getMessage()),
-                        rootCause);
-            }
-            throwable = e;
-            exception(request, response, e);
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            container.getLogger().error(sm.getString(
-                    "standardWrapper.serviceException", wrapper.getName(),
-                    context.getName()), e);
-            throwable = e;
-            exception(request, response, e);
-        }
-
-        // Release the filter chain (if any) for this request
-        if (filterChain != null) {
-            filterChain.reuse();
+            filterChain.release();
         }
 
         // Deallocate the allocated servlet instance
@@ -479,7 +287,6 @@ final class StandardWrapperValve
                 exception(request, response, e);
             }
         }
-
         long t2=System.currentTimeMillis();
 
         long time=t2-t1;
@@ -492,7 +299,6 @@ final class StandardWrapperValve
 
     // -------------------------------------------------------- Private Methods
 
-
     /**
      * Handle the specified ServletException encountered while processing
      * the specified Request to produce the specified Response.  Any

Modified: tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java Tue Nov  4 11:54:58 2014
@@ -25,9 +25,6 @@ import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Globals;
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometFilter;
-import org.apache.catalina.comet.CometFilterChain;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -43,7 +40,7 @@ import org.apache.juli.logging.LogFactor
  * <code>request.getInputStream()</code> and <code>request.getReader()</code>,
  * if requests parsed by them do not use standard value for content mime-type.
  */
-public class FailedRequestFilter extends FilterBase implements CometFilter {
+public class FailedRequestFilter extends FilterBase {
 
     private static final Log log = LogFactory.getLog(FailedRequestFilter.class);
 
@@ -63,19 +60,6 @@ public class FailedRequestFilter extends
         chain.doFilter(request, response);
     }
 
-    @Override
-    public void doFilterEvent(CometEvent event, CometFilterChain chain)
-            throws IOException, ServletException {
-        if (event.getEventType() == CometEvent.EventType.BEGIN
-                && !isGoodRequest(event.getHttpServletRequest())) {
-            event.getHttpServletResponse().sendError(
-                    HttpServletResponse.SC_BAD_REQUEST);
-            event.close();
-            return;
-        }
-        chain.doFilterEvent(event);
-    }
-
     private boolean isGoodRequest(ServletRequest request) {
         // Trigger parsing of parameters
         request.getParameter("none");

Modified: tomcat/trunk/java/org/apache/catalina/filters/RemoteAddrFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/RemoteAddrFilter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/filters/RemoteAddrFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/RemoteAddrFilter.java Tue Nov  4 11:54:58 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.filters;
 
-
 import java.io.IOException;
 
 import javax.servlet.FilterChain;
@@ -24,12 +23,9 @@ import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometFilterChain;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
-
 /**
  * Concrete implementation of <code>RequestFilter</code> that filters
  * based on the string representation of the remote client's IP address.
@@ -72,24 +68,6 @@ public final class RemoteAddrFilter exte
 
     }
 
-    /**
-     * Extract the desired request property, and pass it (along with the comet
-     * event and filter chain) to the protected <code>process()</code> method
-     * to perform the actual filtering.
-     *
-     * @param event The comet event to be processed
-     * @param chain The filter chain for this event
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
-     */
-    @Override
-    public void doFilterEvent(CometEvent event, CometFilterChain chain)
-            throws IOException, ServletException {
-        processCometEvent(event.getHttpServletRequest().getRemoteAddr(),
-                event, chain);
-    }
-
     @Override
     protected Log getLogger() {
         return log;

Modified: tomcat/trunk/java/org/apache/catalina/filters/RemoteHostFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/RemoteHostFilter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/filters/RemoteHostFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/RemoteHostFilter.java Tue Nov  4 11:54:58 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.filters;
 
-
 import java.io.IOException;
 
 import javax.servlet.FilterChain;
@@ -24,12 +23,9 @@ import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometFilterChain;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
-
 /**
  * Concrete implementation of <code>RequestFilter</code> that filters
  * based on the remote client's host name.
@@ -67,24 +63,6 @@ public final class RemoteHostFilter exte
 
     }
 
-    /**
-     * Extract the desired request property, and pass it (along with the comet
-     * event and filter chain) to the protected <code>process()</code> method
-     * to perform the actual filtering.
-     *
-     * @param event The comet event to be processed
-     * @param chain The filter chain for this event
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
-     */
-    @Override
-    public void doFilterEvent(CometEvent event, CometFilterChain chain)
-            throws IOException, ServletException {
-        processCometEvent(event.getHttpServletRequest().getRemoteHost(),
-                event, chain);
-    }
-
     @Override
     protected Log getLogger() {
         return log;

Modified: tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java Tue Nov  4 11:54:58 2014
@@ -26,10 +26,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.catalina.comet.CometEvent;
-import org.apache.catalina.comet.CometFilter;
-import org.apache.catalina.comet.CometFilterChain;
-
 /**
  * Implementation of a Filter that performs filtering based on comparing the
  * appropriate request property (selected based on which subclass you choose
@@ -55,7 +51,7 @@ import org.apache.catalina.comet.CometFi
  * <li>The request will be rejected with a "Forbidden" HTTP response.</li>
  * </ul>
  */
-public abstract class RequestFilter extends FilterBase implements CometFilter {
+public abstract class RequestFilter extends FilterBase {
 
 
     // ----------------------------------------------------- Instance Variables
@@ -214,28 +210,6 @@ public abstract class RequestFilter exte
 
 
     /**
-     * Perform the filtering that has been configured for this Filter, matching
-     * against the specified request property.
-     *
-     * @param property  The property to check against the allow/deny rules
-     * @param event     The comet event to be filtered
-     * @param chain     The comet filter chain
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
-     */
-    protected void processCometEvent(String property, CometEvent event,
-            CometFilterChain chain) throws IOException, ServletException {
-        HttpServletResponse response = event.getHttpServletResponse();
-
-        if (isAllowed(property)) {
-            chain.doFilterEvent(event);
-        } else {
-            response.sendError(denyStatus);
-            event.close();
-        }
-    }
-
-    /**
      * Process the allow and deny rules for the provided property.
      *
      * @param property  The property to test against the allow and deny lists

Modified: tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties Tue Nov  4 11:54:58 2014
@@ -14,8 +14,6 @@
 # limitations under the License.
 
 jdbcAccessLogValve.exception=Exception performing insert access entry
-cometConnectionManagerValve.event=Exception processing event
-cometConnectionManagerValve.listenerEvent=Exception processing session listener event
 
 # Access log valve
 accessLogValve.openFail=Failed to open access log file [{0}]

Modified: tomcat/trunk/java/org/apache/catalina/valves/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/LocalStrings_es.properties?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/LocalStrings_es.properties Tue Nov  4 11:54:58 2014
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 jdbcAccessLogValve.exception = Excepci\u00F3n realizando entrada de acceso a inserci\u00F3n
-cometConnectionManagerValve.event = Excepci\u00F3n procesando evento
-cometConnectionManagerValve.listenerEvent = Excepci\u00F3n procesando evento de oyente de sesi\u00F3n
 accessLogValve.closeFail = No pude cerrar fichero de historial
 accessLogValve.openDirFail = No pude crear directorio [{0}] para historiales de acceso
 accessLogValve.rotateFail = No pude rotar historial de acceso

Modified: tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java Tue Nov  4 11:54:58 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.valves;
 
-
 import java.io.IOException;
 
 import javax.servlet.ServletException;
@@ -27,14 +26,12 @@ import org.apache.catalina.LifecycleExce
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.Pipeline;
 import org.apache.catalina.Valve;
-import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.util.LifecycleMBeanBase;
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.res.StringManager;
 
-
 /**
  * Convenience base class for implementations of the <b>Valve</b> interface.
  * A subclass <strong>MUST</strong> implement an <code>invoke()</code>
@@ -182,27 +179,6 @@ public abstract class ValveBase extends 
         throws IOException, ServletException;
 
 
-    /**
-     * Process a Comet event. This method will rarely need to be provided by
-     * a subclass, unless it needs to reassociate a particular object with
-     * the thread that is processing the request.
-     *
-     * @param request The servlet request to be processed
-     * @param response The servlet response to be created
-     *
-     * @exception IOException if an input/output error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     * @exception ServletException if a servlet error occurs, or is thrown
-     *  by a subsequently invoked Valve, Filter, or Servlet
-     */
-    @Override
-    public void event(Request request, Response response, CometEvent event)
-        throws IOException, ServletException {
-        // Perform the request
-        getNext().event(request, response, event);
-    }
-
-
     @Override
     protected void initInternal() throws LifecycleException {
         super.initInternal();

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Tue Nov  4 11:54:58 2014
@@ -179,9 +179,6 @@ public abstract class AbstractProcessor<
     }
 
     @Override
-    public abstract boolean isComet();
-
-    @Override
     public abstract boolean isUpgrade();
 
     /**
@@ -192,12 +189,6 @@ public abstract class AbstractProcessor<
     public abstract SocketState process(SocketWrapper<S> socket) throws IOException;
 
     /**
-     * Process in-progress Comet requests. These will start as HTTP requests.
-     */
-    @Override
-    public abstract SocketState event(SocketStatus status) throws IOException;
-
-    /**
      * Process in-progress Servlet 3.0 Async requests. These will start as HTTP
      * requests.
      */

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Tue Nov  4 11:54:58 2014
@@ -161,18 +161,6 @@ public abstract class AbstractProtocol<S
 
 
     @Override
-    public boolean isCometSupported() {
-        return endpoint.getUseComet();
-    }
-
-
-    @Override
-    public boolean isCometTimeoutSupported() {
-        return endpoint.getUseCometTimeout();
-    }
-
-
-    @Override
     public boolean isSendfileSupported() {
         return endpoint.getUseSendfile();
     }
@@ -640,16 +628,11 @@ public abstract class AbstractProtocol<S
                             state = processor.asyncDispatch(
                                     nextDispatch.getSocketStatus());
                         }
-                    } else if (status == SocketStatus.DISCONNECT &&
-                            !processor.isComet()) {
+                    } else if (status == SocketStatus.DISCONNECT) {
                         // Do nothing here, just wait for it to get recycled
-                        // Don't do this for Comet we need to generate an end
-                        // event (see BZ 54022)
                     } else if (processor.isAsync() ||
                             state == SocketState.ASYNC_END) {
                         state = processor.asyncDispatch(status);
-                    } else if (processor.isComet()) {
-                        state = processor.event(status);
                     } else if (processor.isUpgrade()) {
                         state = processor.upgradeDispatch(status);
                     } else if (status == SocketStatus.OPEN_WRITE) {

Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ActionCode.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ActionCode.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ActionCode.java Tue Nov  4 11:54:58 2014
@@ -110,31 +110,11 @@ public enum ActionCode {
     REQ_SET_BODY_REPLAY,
 
     /**
-     * Callback for begin Comet processing.
-     */
-    COMET_BEGIN,
-
-    /**
-     * Callback for end Comet processing.
-     */
-    COMET_END,
-
-    /**
      * Callback for getting the amount of available bytes.
      */
     AVAILABLE,
 
     /**
-     * Callback for an asynchronous close of the Comet event
-     */
-    COMET_CLOSE,
-
-    /**
-     * Callback for setting the timeout asynchronously
-     */
-    COMET_SETTIMEOUT,
-
-    /**
      * Callback for an async request.
      */
     ASYNC_START,

Modified: tomcat/trunk/java/org/apache/coyote/Adapter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Adapter.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Adapter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Adapter.java Tue Nov  4 11:54:58 2014
@@ -45,9 +45,6 @@ public interface Adapter {
     public void service(Request req, Response res)
             throws Exception;
 
-    public boolean event(Request req, Response res, SocketStatus status)
-            throws Exception;
-
     public boolean asyncDispatch(Request req,Response res, SocketStatus status)
             throws Exception;
 

Modified: tomcat/trunk/java/org/apache/coyote/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Constants.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Constants.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Constants.java Tue Nov  4 11:54:58 2014
@@ -62,36 +62,6 @@ public final class Constants {
 
     /**
      * The request attribute that is set to the value of {@code Boolean.TRUE}
-     * if connector processing this request supports Comet API.
-     */
-    public static final String COMET_SUPPORTED_ATTR =
-        "org.apache.tomcat.comet.support";
-
-
-    /**
-     * The request attribute that is set to the value of {@code Boolean.TRUE}
-     * if connector processing this request supports setting
-     * per-connection request timeout through Comet API.
-     *
-     * @see org.apache.catalina.comet.CometEvent#setTimeout(int)
-     */
-    public static final String COMET_TIMEOUT_SUPPORTED_ATTR =
-        "org.apache.tomcat.comet.timeout.support";
-
-
-    /**
-     * The request attribute that can be set to a value of type
-     * {@code java.lang.Integer} to specify per-connection request
-     * timeout for Comet API. The value is in milliseconds.
-     *
-     * @see org.apache.catalina.comet.CometEvent#setTimeout(int)
-     */
-    public static final String COMET_TIMEOUT_ATTR =
-        "org.apache.tomcat.comet.timeout";
-
-
-    /**
-     * The request attribute that is set to the value of {@code Boolean.TRUE}
      * if connector processing this request supports use of sendfile.
      */
     public static final String SENDFILE_SUPPORTED_ATTR =

Modified: tomcat/trunk/java/org/apache/coyote/Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Processor.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Processor.java Tue Nov  4 11:54:58 2014
@@ -36,8 +36,6 @@ public interface Processor<S> {
 
     SocketState process(SocketWrapper<S> socketWrapper) throws IOException;
 
-    SocketState event(SocketStatus status) throws IOException;
-
     SocketState asyncDispatch(SocketStatus status);
     SocketState asyncPostProcess();
 
@@ -46,7 +44,6 @@ public interface Processor<S> {
 
     void errorDispatch();
 
-    boolean isComet();
     boolean isAsync();
     boolean isUpgrade();
 

Modified: tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java Tue Nov  4 11:54:58 2014
@@ -91,18 +91,6 @@ public interface ProtocolHandler {
 
 
     /**
-     * Does this ProtocolHandler support Comet?
-     */
-    public boolean isCometSupported();
-
-
-    /**
-     * Does this ProtocolHandler support Comet timeouts?
-     */
-    public boolean isCometTimeoutSupported();
-
-
-    /**
      * Does this ProtocolHandler support sendfile?
      */
     public boolean isSendfileSupported();

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Tue Nov  4 11:54:58 2014
@@ -587,26 +587,6 @@ public abstract class AbstractAjpProcess
             throw new UnsupportedOperationException(
                     sm.getString("ajpprocessor.httpupgrade.notsupported"));
         }
-        case COMET_BEGIN: {
-            // HTTP connections only. Unsupported for AJP.
-            throw new UnsupportedOperationException(
-                    sm.getString("ajpprocessor.comet.notsupported"));
-        }
-        case COMET_END: {
-            // HTTP connections only. Unsupported for AJP.
-            throw new UnsupportedOperationException(
-                    sm.getString("ajpprocessor.comet.notsupported"));
-        }
-        case COMET_CLOSE: {
-            // HTTP connections only. Unsupported for AJP.
-            throw new UnsupportedOperationException(
-                    sm.getString("ajpprocessor.comet.notsupported"));
-        }
-        case COMET_SETTIMEOUT: {
-            // HTTP connections only. Unsupported for AJP.
-            throw new UnsupportedOperationException(
-                    sm.getString("ajpprocessor.comet.notsupported"));
-        }
         case AVAILABLE: {
             if (available()) {
                 request.setAvailable(1);
@@ -894,14 +874,6 @@ public abstract class AbstractAjpProcess
 
 
     @Override
-    public SocketState event(SocketStatus status) throws IOException {
-        // Should never reach this code but in case we do...
-        throw new IOException(
-                sm.getString("ajpprocessor.comet.notsupported"));
-    }
-
-
-    @Override
     public SocketState upgradeDispatch(SocketStatus status) throws IOException {
         // Should never reach this code but in case we do...
         throw new IOException(
@@ -1071,13 +1043,6 @@ public abstract class AbstractAjpProcess
 
 
     @Override
-    public final boolean isComet() {
-        // AJP does not support Comet
-        return false;
-    }
-
-
-    @Override
     public final boolean isUpgrade() {
         // AJP does not support HTTP upgrade
         return false;

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNio2Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNio2Protocol.java?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNio2Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNio2Protocol.java Tue Nov  4 11:54:58 2014
@@ -27,7 +27,6 @@ import org.apache.tomcat.util.net.Nio2Ch
 import org.apache.tomcat.util.net.Nio2Endpoint;
 import org.apache.tomcat.util.net.Nio2Endpoint.Handler;
 import org.apache.tomcat.util.net.SSLImplementation;
-import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
 
 
@@ -156,7 +155,7 @@ public class AjpNio2Protocol extends Abs
         @Override
         public void closeAll() {
             for (Nio2Channel channel : connections.keySet()) {
-                ((Nio2Endpoint) proto.endpoint).closeSocket(channel.getSocket(), SocketStatus.STOP);
+                ((Nio2Endpoint) proto.endpoint).closeSocket(channel.getSocket());
             }
         }
     }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1636547&r1=1636546&r2=1636547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Tue Nov  4 11:54:58 2014
@@ -15,7 +15,6 @@
 ajpnioprotocol.releaseStart=Iterating through our connections to release a socket channel [{0}]
 ajpnioprotocol.releaseEnd=Done iterating through our connections to release a socket channel [{0}] released [{1}]
 
-ajpprocessor.comet.notsupported=Comet is not supported by the AJP protocol
 ajpprocessor.failedread=Socket read failed
 ajpprocessor.failedsend=Failed to send AJP message
 ajpprocessor.header.error=Header message parsing failed
@@ -24,7 +23,6 @@ ajpprocessor.readtimeout=Timeout attempt
 ajpprocessor.request.prepare=Error preparing request
 ajpprocessor.request.process=Error processing request
 ajpprocessor.certs.fail=Certificate conversion failed
-ajpprocessor.comet.notsupported=The Comet protocol is not supported by this connector
 ajpprocessor.ssl.notsupported=The SSL protocol is not supported by this connector
 ajpprocessor.httpupgrade.notsupported=HTTP upgrade is not supported by the AJP protocol
 



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