You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2016/02/05 16:02:03 UTC

svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Author: remm
Date: Fri Feb  5 15:02:02 2016
New Revision: 1728676

URL: http://svn.apache.org/viewvc?rev=1728676&view=rev
Log:
Switch APR default behavior, as previously announced. Will revert if there's a major problem, and will update the SSL docs otherwise.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1728676&r1=1728675&r2=1728676&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri Feb  5 15:02:02 2016
@@ -78,7 +78,7 @@ public class AprLifecycleListener
     protected static boolean sslInitialized = false;
     protected static boolean aprInitialized = false;
     protected static boolean aprAvailable = false;
-    protected static boolean aprPreferred = true;
+    protected static boolean aprPreferred = false;
     protected static boolean fipsModeActive = false;
 
     /**

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1728676&r1=1728675&r2=1728676&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb  5 15:02:02 2016
@@ -51,6 +51,11 @@
         Ensure that <code>/WEB-INF/classes</code> is never processed as a web
         fragment. (markt)
       </fix>
+      <update>
+        Switch default connector when native is installed. Unless configured
+        otherwise, the NIO endpoint will be used by default. If SSL is
+        configured, OpenSSL will be used rather than JSSE. (remm)
+      </update>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 05/02/2016 17:54, Rémy Maucherat wrote:
> 2016-02-05 18:28 GMT+01:00 Mark Thomas <ma...@apache.org>:
> 
>> Ah. Not sure how I managed to get confused on this. The name makes
>> perfect sense in that case.
>>
> It must be a bad name for the flag since you got confused by what it does,
> so you can change it. I objected because the proposed name was wrong.
> Ideas: useAprConnector (not that good, the connector can still be used even
> if the flag is false), aprConnectorAsDefault (maybe, but a bit long),
> defaultToAprConnector (sounds average).

I think the name is fine. What confused me was that when I wasn't sure
what it did I reviewed the code and the code wasn't quite right in all
cases. I've just fixed that. I think we are good now (assuming you agree
my fixes are correct).

Mark


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


Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Rémy Maucherat <re...@apache.org>.
2016-02-06 0:02 GMT+01:00 Christopher Schultz <ch...@christopherschultz.net>
:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rémy,
>
> On 2/5/16 12:54 PM, Rémy Maucherat wrote:
> > 2016-02-05 18:28 GMT+01:00 Mark Thomas <ma...@apache.org>:
> >
> >> Ah. Not sure how I managed to get confused on this. The name
> >> makes perfect sense in that case.
> >>
> > It must be a bad name for the flag since you got confused by what
> > it does, so you can change it.
>
> +1
>
> It took me a minute to remember that the choice was between APR and
> NIO, not between OpenSSL and JSSE.
>
> Incidentally... how does one choose NIO+JSSE when APR+OpenSSL (or
> NIO+OpenSSL) is available?
>

Yes.

>
> > I objected because the proposed name was wrong. Ideas:
> > useAprConnector (not that good, the connector can still be used
> > even if the flag is false), aprConnectorAsDefault (maybe, but a
> > bit long), defaultToAprConnector (sounds average).
>
> How about connectorForTLS="NIO|NIO2|APR" ?
>

I would like the default to use a single connector for "SSL" and non "SSL".

>
> One can always use "protocol" to be explicit, no?
>

Yes.

Rémy

Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rémy,

On 2/5/16 12:54 PM, Rémy Maucherat wrote:
> 2016-02-05 18:28 GMT+01:00 Mark Thomas <ma...@apache.org>:
> 
>> Ah. Not sure how I managed to get confused on this. The name
>> makes perfect sense in that case.
>> 
> It must be a bad name for the flag since you got confused by what
> it does, so you can change it.

+1

It took me a minute to remember that the choice was between APR and
NIO, not between OpenSSL and JSSE.

Incidentally... how does one choose NIO+JSSE when APR+OpenSSL (or
NIO+OpenSSL) is available?

> I objected because the proposed name was wrong. Ideas: 
> useAprConnector (not that good, the connector can still be used
> even if the flag is false), aprConnectorAsDefault (maybe, but a
> bit long), defaultToAprConnector (sounds average).

How about connectorForTLS="NIO|NIO2|APR" ?

One can always use "protocol" to be explicit, no?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAla1KiMACgkQ9CaO5/Lv0PCDdgCgw2j8fh4h86V7wl4rQMtUD45g
02oAn1PrtuDhtAkq8PNZz2QRhXSm5p5G
=/zcb
-----END PGP SIGNATURE-----

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


Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Rémy Maucherat <re...@apache.org>.
2016-02-05 18:28 GMT+01:00 Mark Thomas <ma...@apache.org>:

> Ah. Not sure how I managed to get confused on this. The name makes
> perfect sense in that case.
>
> It must be a bad name for the flag since you got confused by what it does,
so you can change it. I objected because the proposed name was wrong.
Ideas: useAprConnector (not that good, the connector can still be used even
if the flag is false), aprConnectorAsDefault (maybe, but a bit long),
defaultToAprConnector (sounds average).

Rémy

Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 05/02/2016 15:32, Rémy Maucherat wrote:
> 2016-02-05 16:10 GMT+01:00 Mark Thomas <ma...@apache.org>:
> 
>>> Switch APR default behavior, as previously announced. Will revert if
>> there's a major problem, and will update the SSL docs otherwise.
>>
>> Any objection to me trying to come up with a different name for this?
>> Every time I look at it I seem to spend a couple minutes figuring out
>> what true and false mean.
>>
> 
> The flag means you prefer using the APR connector (or not) :)
> 
>>
>> I'm thinking of something like:
>> preferOpenSslForTls
>>
> 
> That's not what the flag does. For non SSL, the NIO connector is now always
> the default, even if native is installed. For SSL, NIO+OpenSSL is the
> default if native is installed, and NIO+JSSE otherwise.

Ah. Not sure how I managed to get confused on this. The name makes
perfect sense in that case.

Mark


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


Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Rémy Maucherat <re...@apache.org>.
2016-02-05 16:10 GMT+01:00 Mark Thomas <ma...@apache.org>:

> > Switch APR default behavior, as previously announced. Will revert if
> there's a major problem, and will update the SSL docs otherwise.
>
> Any objection to me trying to come up with a different name for this?
> Every time I look at it I seem to spend a couple minutes figuring out
> what true and false mean.
>

The flag means you prefer using the APR connector (or not) :)

>
> I'm thinking of something like:
> preferOpenSslForTls
>

That's not what the flag does. For non SSL, the NIO connector is now always
the default, even if native is installed. For SSL, NIO+OpenSSL is the
default if native is installed, and NIO+JSSE otherwise.

>
> It has the inverse meaning to the current setting but I think it is
> clearer.
>
> Rémy

Re: svn commit: r1728676 - in /tomcat/trunk: java/org/apache/catalina/core/AprLifecycleListener.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 05/02/2016 15:02, remm@apache.org wrote:
> Author: remm
> Date: Fri Feb  5 15:02:02 2016
> New Revision: 1728676
> 
> URL: http://svn.apache.org/viewvc?rev=1728676&view=rev
> Log:
> Switch APR default behavior, as previously announced. Will revert if there's a major problem, and will update the SSL docs otherwise.

Any objection to me trying to come up with a different name for this?
Every time I look at it I seem to spend a couple minutes figuring out
what true and false mean.

I'm thinking of something like:
preferOpenSslForTls

It has the inverse meaning to the current setting but I think it is clearer.

Mark


> Modified:
>     tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
>     tomcat/trunk/webapps/docs/changelog.xml
> 
> Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1728676&r1=1728675&r2=1728676&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri Feb  5 15:02:02 2016
> @@ -78,7 +78,7 @@ public class AprLifecycleListener
>      protected static boolean sslInitialized = false;
>      protected static boolean aprInitialized = false;
>      protected static boolean aprAvailable = false;
> -    protected static boolean aprPreferred = true;
> +    protected static boolean aprPreferred = false;
>      protected static boolean fipsModeActive = false;
>  
>      /**
> 
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1728676&r1=1728675&r2=1728676&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb  5 15:02:02 2016
> @@ -51,6 +51,11 @@
>          Ensure that <code>/WEB-INF/classes</code> is never processed as a web
>          fragment. (markt)
>        </fix>
> +      <update>
> +        Switch default connector when native is installed. Unless configured
> +        otherwise, the NIO endpoint will be used by default. If SSL is
> +        configured, OpenSSL will be used rather than JSSE. (remm)
> +      </update>
>      </changelog>
>    </subsection>
>    <subsection name="Coyote">
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


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