[tomcat] branch 10.0.x updated: Working on removing the APR connector - found more required deprecation

2021-08-18 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 38b808c  Working on removing the APR connector - found more required 
deprecation
38b808c is described below

commit 38b808c7a98d64a661937e50aba52b903ade13fe
Author: Mark Thomas 
AuthorDate: Wed Aug 18 17:18:23 2021 +0100

Working on removing the APR connector - found more required deprecation
---
 java/org/apache/catalina/connector/Connector.java  | 1 +
 java/org/apache/catalina/manager/StatusManagerServlet.java | 1 +
 java/org/apache/catalina/manager/StatusTransformer.java| 3 +++
 java/org/apache/coyote/ProtocolHandler.java| 3 +++
 4 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/connector/Connector.java 
b/java/org/apache/catalina/connector/Connector.java
index 485a26a..b423784 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -1006,6 +1006,7 @@ public class Connector extends LifecycleMBeanBase  {
 }
 
 
+@SuppressWarnings("deprecation")
 @Override
 protected void initInternal() throws LifecycleException {
 
diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index 65609b3..e4cb5dd 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -184,6 +184,7 @@ public class StatusManagerServlet
  * @exception IOException if an input/output error occurs
  * @exception ServletException if a servlet-specified error occurs
  */
+@SuppressWarnings("deprecation")
 @Override
 public void doGet(HttpServletRequest request,
   HttpServletResponse response)
diff --git a/java/org/apache/catalina/manager/StatusTransformer.java 
b/java/org/apache/catalina/manager/StatusTransformer.java
index 2cf2cc9..54d696f 100644
--- a/java/org/apache/catalina/manager/StatusTransformer.java
+++ b/java/org/apache/catalina/manager/StatusTransformer.java
@@ -150,7 +150,10 @@ public class StatusTransformer {
  * @param mode Mode 0 will generate HTML.
  * Mode 1 will generate XML.
  * @param args I18n labels for the OS state values
+ *
+ * @deprecated This method will be removed in Tomcat 10.1.x onwards
  */
+@Deprecated
 public static void writeOSState(PrintWriter writer, int mode, Object[] 
args) {
 long[] result = new long[16];
 boolean ok = false;
diff --git a/java/org/apache/coyote/ProtocolHandler.java 
b/java/org/apache/coyote/ProtocolHandler.java
index cf25010..6992ea9 100644
--- a/java/org/apache/coyote/ProtocolHandler.java
+++ b/java/org/apache/coyote/ProtocolHandler.java
@@ -153,7 +153,10 @@ public interface ProtocolHandler {
  *
  * @return true if this Protocol Handler requires the
  * APR/native library, otherwise false
+ *
+ * @deprecated This method will be removed in Tomcat 10.1.x onwards
  */
+@Deprecated
 public boolean isAprRequired();
 
 

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



Re: Removing the APR connector

2020-09-29 Thread Christopher Schultz
Rémy,

On 9/29/20 07:57, Rémy Maucherat wrote:
> On Tue, Sep 29, 2020 at 1:32 PM Mark Thomas  wrote:
> 
>> All,
>>
>> Removing the APR connector (HTTP and AJP) is currently on the TODO list
>> for Tomcat 10.0.x (i.e. the current development branch).
>>
>> I am wondering whether we are still happy with this plan as we have had
>> a few 10.0.x milestone releases and we haven't made any efforts to
>> remove the APR connector.
>>
>> I'm happy to remove APR from 10.0.x but I am equally happy postponing
>> this to a later release if necessary.
>>
>> We'd still need Tomcat Native support to enable the use of OpenSSL with
>> NIO and NIO2. I am only thinking of removing the APR based HTTP and AJP
>> connectors (with associated plumbing) and possibly some of the
>> org.apache.tomcat.jni package.
>>
>> Thoughts?
> 
> I would rather postpone at this point, with the idea of really removing it
> in 10.1.

I don't know how popular the APR connector is. There are probably lots
of users who use it because "it's the fastest" and they haven't changed
since 2005.

I also don't know how many users are actually using NIO+OpenSSL. APR is
well-known to be reliable and has good performance. I think the
NIO+OpenSSL is less popularly deployed. Is it "too fast" to remove it in
10.0?

> Maybe we should remove it from the docs in 10.0 in preparation for the move
> ?

I wouldn't remove it from the docs, but maybe very clearly advertise
that it's being removed.

-chris

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



RE: Removing the APR connector

2020-09-29 Thread jonmcalexander
👍coolio


Dream * Excel * Explore * Inspire
Jon McAlexander
Infrastructure Engineer
Asst Vice President

Middleware Product Engineering
Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com


This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


-Original Message-
From: Mark Thomas  
Sent: Tuesday, September 29, 2020 10:54 AM
To: dev@tomcat.apache.org
Subject: Re: Removing the APR connector

On 29/09/2020 16:29, jonmcalexan...@wellsfargo.com.INVALID wrote:
> I know I'm not a contributor, but what is the reason for removing the APR 
> Connector?

It is inherently less stable. If we get the NIO code wrong, you might see a 
NullPointerException. If we get the APR code wrong you might see a JVM crash.

The primary benefit when the connector was first introduced was performance. 
With current JVMs HTTP performance of pure Java connectors is broadly similar 
to the APR/Native connector. For HTTPS, APR/Native still provides a performance 
boost but we see a similar performance boost when we use APR/Native to plug 
OpenSSL into NIO or NIO2 and that requires less native code (and hence is less 
prune to stability issues).

In short, we can get the same benefits as the APR connector with
NIO+OpenSSL with less native code and hence less risk.

There are secondary benefits in terms of where we can clean up some of the 
Tomcat internals if we only need to support two connectors (NIO and
NIO2) rather than 3.

Mark

> 
> 
> Dream * Excel * Explore * Inspire
> Jon McAlexander
> Infrastructure Engineer
> Asst Vice President
> 
> Middleware Product Engineering
> Enterprise CIO | Platform Services | Middleware | Infrastructure 
> Solutions
> 
> 8080 Cobblestone Rd | Urbandale, IA 50322
> MAC: F4469-010
> Tel 515-988-2508 | Cell 515-988-2508
> 
> jonmcalexan...@wellsfargo.com
> 
> 
> This message may contain confidential and/or privileged information. If you 
> are not the addressee or authorized to receive this for the addressee, you 
> must not use, copy, disclose, or take any action based on this message or any 
> information herein. If you have received this message in error, please advise 
> the sender immediately by reply e-mail and delete this message. Thank you for 
> your cooperation.
> 
> 
> -Original Message-
> From: Rémy Maucherat 
> Sent: Tuesday, September 29, 2020 6:58 AM
> To: Tomcat Developers List 
> Subject: Re: Removing the APR connector
> 
> On Tue, Sep 29, 2020 at 1:32 PM Mark Thomas  wrote:
> 
>> All,
>>
>> Removing the APR connector (HTTP and AJP) is currently on the TODO 
>> list for Tomcat 10.0.x (i.e. the current development branch).
>>
>> I am wondering whether we are still happy with this plan as we have 
>> had a few 10.0.x milestone releases and we haven't made any efforts 
>> to remove the APR connector.
>>
>> I'm happy to remove APR from 10.0.x but I am equally happy postponing 
>> this to a later release if necessary.
>>
>> We'd still need Tomcat Native support to enable the use of OpenSSL 
>> with NIO and NIO2. I am only thinking of removing the APR based HTTP 
>> and AJP connectors (with associated plumbing) and possibly some of 
>> the org.apache.tomcat.jni package.
>>
>> Thoughts?
>>
> 
> I would rather postpone at this point, with the idea of really removing it in 
> 10.1.
> Maybe we should remove it from the docs in 10.0 in preparation for the move ?
> 
> Rémy
> 
> 
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For 
>> additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For 
> additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



Re: Removing the APR connector

2020-09-29 Thread Mark Thomas
On 29/09/2020 16:29, jonmcalexan...@wellsfargo.com.INVALID wrote:
> I know I'm not a contributor, but what is the reason for removing the APR 
> Connector?

It is inherently less stable. If we get the NIO code wrong, you might
see a NullPointerException. If we get the APR code wrong you might see a
JVM crash.

The primary benefit when the connector was first introduced was
performance. With current JVMs HTTP performance of pure Java connectors
is broadly similar to the APR/Native connector. For HTTPS, APR/Native
still provides a performance boost but we see a similar performance
boost when we use APR/Native to plug OpenSSL into NIO or NIO2 and that
requires less native code (and hence is less prune to stability issues).

In short, we can get the same benefits as the APR connector with
NIO+OpenSSL with less native code and hence less risk.

There are secondary benefits in terms of where we can clean up some of
the Tomcat internals if we only need to support two connectors (NIO and
NIO2) rather than 3.

Mark

> 
> 
> Dream * Excel * Explore * Inspire
> Jon McAlexander
> Infrastructure Engineer
> Asst Vice President
> 
> Middleware Product Engineering
> Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions
> 
> 8080 Cobblestone Rd | Urbandale, IA 50322
> MAC: F4469-010
> Tel 515-988-2508 | Cell 515-988-2508
> 
> jonmcalexan...@wellsfargo.com
> 
> 
> This message may contain confidential and/or privileged information. If you 
> are not the addressee or authorized to receive this for the addressee, you 
> must not use, copy, disclose, or take any action based on this message or any 
> information herein. If you have received this message in error, please advise 
> the sender immediately by reply e-mail and delete this message. Thank you for 
> your cooperation.
> 
> 
> -Original Message-
> From: Rémy Maucherat  
> Sent: Tuesday, September 29, 2020 6:58 AM
> To: Tomcat Developers List 
> Subject: Re: Removing the APR connector
> 
> On Tue, Sep 29, 2020 at 1:32 PM Mark Thomas  wrote:
> 
>> All,
>>
>> Removing the APR connector (HTTP and AJP) is currently on the TODO 
>> list for Tomcat 10.0.x (i.e. the current development branch).
>>
>> I am wondering whether we are still happy with this plan as we have 
>> had a few 10.0.x milestone releases and we haven't made any efforts to 
>> remove the APR connector.
>>
>> I'm happy to remove APR from 10.0.x but I am equally happy postponing 
>> this to a later release if necessary.
>>
>> We'd still need Tomcat Native support to enable the use of OpenSSL 
>> with NIO and NIO2. I am only thinking of removing the APR based HTTP 
>> and AJP connectors (with associated plumbing) and possibly some of the 
>> org.apache.tomcat.jni package.
>>
>> Thoughts?
>>
> 
> I would rather postpone at this point, with the idea of really removing it in 
> 10.1.
> Maybe we should remove it from the docs in 10.0 in preparation for the move ?
> 
> Rémy
> 
> 
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For 
>> additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



RE: Removing the APR connector

2020-09-29 Thread jonmcalexander
I know I'm not a contributor, but what is the reason for removing the APR 
Connector?


Dream * Excel * Explore * Inspire
Jon McAlexander
Infrastructure Engineer
Asst Vice President

Middleware Product Engineering
Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com


This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


-Original Message-
From: Rémy Maucherat  
Sent: Tuesday, September 29, 2020 6:58 AM
To: Tomcat Developers List 
Subject: Re: Removing the APR connector

On Tue, Sep 29, 2020 at 1:32 PM Mark Thomas  wrote:

> All,
>
> Removing the APR connector (HTTP and AJP) is currently on the TODO 
> list for Tomcat 10.0.x (i.e. the current development branch).
>
> I am wondering whether we are still happy with this plan as we have 
> had a few 10.0.x milestone releases and we haven't made any efforts to 
> remove the APR connector.
>
> I'm happy to remove APR from 10.0.x but I am equally happy postponing 
> this to a later release if necessary.
>
> We'd still need Tomcat Native support to enable the use of OpenSSL 
> with NIO and NIO2. I am only thinking of removing the APR based HTTP 
> and AJP connectors (with associated plumbing) and possibly some of the 
> org.apache.tomcat.jni package.
>
> Thoughts?
>

I would rather postpone at this point, with the idea of really removing it in 
10.1.
Maybe we should remove it from the docs in 10.0 in preparation for the move ?

Rémy


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


Re: Removing the APR connector

2020-09-29 Thread Rémy Maucherat
On Tue, Sep 29, 2020 at 1:32 PM Mark Thomas  wrote:

> All,
>
> Removing the APR connector (HTTP and AJP) is currently on the TODO list
> for Tomcat 10.0.x (i.e. the current development branch).
>
> I am wondering whether we are still happy with this plan as we have had
> a few 10.0.x milestone releases and we haven't made any efforts to
> remove the APR connector.
>
> I'm happy to remove APR from 10.0.x but I am equally happy postponing
> this to a later release if necessary.
>
> We'd still need Tomcat Native support to enable the use of OpenSSL with
> NIO and NIO2. I am only thinking of removing the APR based HTTP and AJP
> connectors (with associated plumbing) and possibly some of the
> org.apache.tomcat.jni package.
>
> Thoughts?
>

I would rather postpone at this point, with the idea of really removing it
in 10.1.
Maybe we should remove it from the docs in 10.0 in preparation for the move
?

Rémy


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


Re: Removing the APR connector

2020-09-29 Thread Martin Grigorov
On Tue, Sep 29, 2020 at 2:31 PM Mark Thomas  wrote:

> All,
>
> Removing the APR connector (HTTP and AJP) is currently on the TODO list
> for Tomcat 10.0.x (i.e. the current development branch).
>
> I am wondering whether we are still happy with this plan as we have had
> a few 10.0.x milestone releases and we haven't made any efforts to
> remove the APR connector.
>
> I'm happy to remove APR from 10.0.x but I am equally happy postponing
> this to a later release if necessary.
>
> We'd still need Tomcat Native support to enable the use of OpenSSL with
> NIO and NIO2. I am only thinking of removing the APR based HTTP and AJP
> connectors (with associated plumbing) and possibly some of the
> org.apache.tomcat.jni package.
>
> Thoughts?
>

+1 to remove!


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


Removing the APR connector

2020-09-29 Thread Mark Thomas
All,

Removing the APR connector (HTTP and AJP) is currently on the TODO list
for Tomcat 10.0.x (i.e. the current development branch).

I am wondering whether we are still happy with this plan as we have had
a few 10.0.x milestone releases and we haven't made any efforts to
remove the APR connector.

I'm happy to remove APR from 10.0.x but I am equally happy postponing
this to a later release if necessary.

We'd still need Tomcat Native support to enable the use of OpenSSL with
NIO and NIO2. I am only thinking of removing the APR based HTTP and AJP
connectors (with associated plumbing) and possibly some of the
org.apache.tomcat.jni package.

Thoughts?

Mark

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