Author: markt
Date: Mon Jun 26 12:05:09 2017
New Revision: 1799883

URL: http://svn.apache.org/viewvc?rev=1799883&view=rev
Log:
 To ease migration from 8.0.x to 8.5.x, if the HTTP or AJP BIO connector is 
explicitly configured, rather than failing to start the connector because BIO 
has been removed, automatically switch to NIO and continue.
A warning will be logged to alert the user to the switch.

Added:
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java   (with 
props)
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java   
(with props)
Modified:
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/LocalStrings.properties
    tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Added: tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1799883&view=auto
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (added)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Mon Jun 26 
12:05:09 2017
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  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.
+ */
+package org.apache.coyote.ajp;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * @deprecated This class will be removed in Tomcat 9.
+ */
+@Deprecated
+public class AjpProtocol extends AjpNioProtocol {
+
+    private static final Log log = LogFactory.getLog(AjpProtocol.class);
+    private static final StringManager sm = 
StringManager.getManager(AjpProtocol.class);
+
+
+    public AjpProtocol() {
+        super();
+        log.warn(sm.getString("ajpprotocol.noBio"));
+    }
+}
\ No newline at end of file

Propchange: tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1799883&r1=1799882&r2=1799883&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/LocalStrings.properties 
(original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Mon 
Jun 26 12:05:09 2017
@@ -12,6 +12,11 @@
 # 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.
+ajpprotocol.noBio=The AJP BIO connector has been removed in Tomcat 8.5.x 
onwards. The AJP BIO connector configuration has been automatically switched to 
use the AJP NIO connector instead.
+ajpprotocol.noSSL=SSL is not supported with AJP. The SSL host configuration 
for [{0}] was ignored
+ajpprotocol.noUpgrade=Upgrade is not supported with AJP. The UpgradeProtocol 
configuration for [{0}] was ignored
+ajpprotocol.noUpgradeHandler=Upgrade is not supported with AJP. The 
HttpUpgradeHandler [{0}] can not be processed
+
 ajpprotocol.noSSL=SSL is not supported with AJP. The SSL host configuration 
for [{0}] was ignored
 ajpprotocol.noUpgrade=Upgrade is not supported with AJP. The UpgradeProtocol 
configuration for [{0}] was ignored
 ajpprotocol.noUpgradeHandler=Upgrade is not supported with AJP. The 
HttpUpgradeHandler [{0}] can not be processed

Added: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1799883&view=auto
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java 
(added)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java Mon 
Jun 26 12:05:09 2017
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  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.
+ */
+package org.apache.coyote.http11;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * @deprecated This class will be removed in Tomcat 9.
+ */
+@Deprecated
+public class Http11Protocol extends Http11NioProtocol {
+
+    private static final Log log = LogFactory.getLog(Http11Protocol.class);
+    private static final StringManager sm = 
StringManager.getManager(Http11Protocol.class);
+
+
+    public Http11Protocol() {
+        super();
+        log.warn(sm.getString("http11protocol.noBio"));
+    }
+}
\ No newline at end of file

Propchange: 
tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1799883&r1=1799882&r2=1799883&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
(original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
Mon Jun 26 12:05:09 2017
@@ -17,6 +17,8 @@ abstractHttp11Protocol.alpnConfigured=Th
 abstractHttp11Protocol.alpnWithNoAlpn=The upgrade handler [{0}] for [{1}] only 
supports upgrade via ALPN but has been configured for the [{2}] connector that 
does not support ALPN.
 abstractHttp11Protocol.httpUpgradeConfigured=The [{0}] connector has been 
configured to support HTTP upgrade to [{1}]
 
+http11protocol.noBio=The HTTP BIO connector has been removed in Tomcat 8.5.x 
onwards. The HTTP BIO connector configuration has been automatically switched 
to use the HTTP NIO connector instead.
+
 http11processor.fallToDebug=\n Note: further occurrences of HTTP header 
parsing errors will be logged at DEBUG level.
 http11processor.header.parse=Error parsing HTTP request header
 http11processor.neverused=This method should never be used

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1799883&r1=1799882&r2=1799883&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Mon Jun 26 12:05:09 2017
@@ -66,6 +66,12 @@
       <fix>
         <bug>60461</bug>: Sync SSL session access for the APR connector. (remm)
       </fix>
+      <add>
+        To ease migration from 8.0.x to 8.5.x, if the HTTP or AJP BIO connector
+        is explicitly configured, rather than failing to start the connector
+        because BIO has been removed, automatically switch to NIO and continue.
+        A warning will be logged to alert the user to the switch. (markt)
+      </add>
     </changelog>
   </subsection>
 </section>



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

Reply via email to