Correct, I tested it:

Tested with HTTP connector

<Connector port="8080" 
                   protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443"
                   maxParameterCount="1000"
                   />

and it loaded Native 1:

14:41:48.471 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) Loaded Apache 
Tomcat Native library [1.3.1] using APR version [1.7.4].
14:41:48.471 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) APR 
capabilities: IPv6 [true], sendfile [true], accept filters [false], random 
[true], UDS [true].
14:41:48.471 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) APR/OpenSSL 
configuration: useAprConnector [false], useOpenSSL [true]
14:41:48.489 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#initializeSSL) OpenSSL 
successfully initialized [OpenSSL 3.0.14 4 Jun 2024]

Then changed protocol

protocol="org.apache.coyote.http11.Http11NioProtocol"

but it still loaded only Native 1.
Then renamed tcnative-1.dll so that Tomcat does not find it.
Then it loaded Native 2:

14:55:32.002 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) Loaded Apache 
Tomcat Native library [2.0.9] using APR version [1.7.6].
14:55:32.002 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) APR 
capabilities: IPv6 [true], sendfile [true], accept filters [false], random 
[true], UDS [true].
14:55:32.002 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#lifecycleEvent) APR/OpenSSL 
configuration: useAprConnector [false], useOpenSSL [true]
14:55:32.021 INF> (main) 
(org.apache.catalina.core.AprLifecycleListener#initializeSSL) OpenSSL 
successfully initialized [OpenSSL 3.5.0 8 Apr 2025]

-Harri

-----Original Message-----
From: Mark Thomas <ma...@apache.org> 
Sent: perjantai 12. syyskuuta 2025 17.47
To: users@tomcat.apache.org
Subject: Re: Tomcat Native 1.3.1 vs 2.0.9

On 12/09/2025 15:33, Harri Pesonen wrote:
> Thanks, currently we have option to use APR but NIO is the default.
> Perhaps we drop APR and then switch to Tomcat Native 2.
> 
> What if we have both tcnative-1.dll and tcnative-2.dll available, I 
> guess that Tomcat will use tcnative-2.dll with NIO and tcnative-1.dll 
> with APR ? 😊

You can only load one version of Tomcat Native into the JVM at any one time. If 
both are present, 1.x is used in preference to 2.x.

Mark


> 
> -Harri
> 
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: perjantai 12. syyskuuta 2025 15.17
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: Re: Tomcat Native 1.3.1 vs 2.0.9
> 
> On 12/09/2025 12:06, Harri Pesonen wrote:
>> Hello,
>>
>> download page for Tomcat Native has two versions, 2.0.9 and 1.3.1:
>>
>> https://tomc/
>> at.apache.org%2Fdownload-native.cgi&data=05%7C02%7Charri.pesonen%40si
>> n
>> ch.com%7C1228e855b1974189438508ddf1f6e623%7C3b518aae89214a7b8497619d7
>> 5 
>> 6ce20e%7C0%7C0%7C638932764925647778%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0e
>> U 
>> 1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIld
>> U 
>> IjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=plWNOFB8KZmjPF5SgY9wB3hlSP2BVbVuWr8xc
>> n
>> 5IYmM%3D&reserved=0
>>
>> We are currently using 1.3.1 and there has not been so many changes lately, 
>> compare to version 2.
>> I fail to find documentation for why one should use one or other, what is 
>> the difference between these two versions?
> 
> The change log would be a good place to start:
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftomc
> at.apache.org%2Fnative-doc%2Fmiscellaneous%2Fchangelog.html&data=05%7C
> 02%7Charri.pesonen%40sinch.com%7Ce179de03ec4a4a9592c608ddf20ba678%7C3b
> 518aae89214a7b8497619d756ce20e%7C0%7C0%7C638932854046978831%7CUnknown%
> 7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4z
> MiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=R9FXJ9C49%2B%2
> BXLA7af10wzmn4ApRM%2BgD8YmiaxNyPH4c%3D&reserved=0
> 
> The 2.0.0 entry describes what was removed/changed between 1.3.1 and 
> 2.0.0
> 
>> Can I simply drop version 2 in place of version 1?
>> The DLL names are different, 1.3.1 is tcnative-1.dll while 2.0.9 is 
>> tcnative-2.dll.
> 
> If you want to use one of the APR connectors, you need to use 1.3.x.
> 
> If you use NIO (or NIO2) with OpenSSL then 2.x is fine.
> 
> Note: Tomcat is moving towards just supporting NIO (no NIO2, no APR) for HTTP 
> and AJP with OpenSSL support via Tomcat Native as an option for HTTP.
> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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


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

Reply via email to