RE: Tomcat 10 and virtual thread

COURTAULT Francois <[email protected]>
Newsgroups gmane.comp.jakarta.tomcat.user
Message-ID <MRYP264MB63355F82599DF0C9021B815B9DC7A@MRYP264MB6335.FRAP264.PROD.OUTLOOK.COM>
THALES GROUP LIMITED DISTRIBUTION to email recipients

Hello Christopher,

Thanks for the explanation.
So :
<Connector port="8080" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 redirectPort="8443"
                 maxParameterCount="1000"
                 useVirtualThreads="true" />

is equivalent to
- define an executor  <Executor name="virtualThread"
                                                        className="org.apache.catalina.core.StandardVirtualThreadExecutor" />
- use it
<Connector executor="virtualThread" port="8080" protocol="HTTP/1.1"
                      connectionTimeout="20000"
                      redirectPort="8443"
                      maxParameterCount="1000"/>
right ?

If the answer is yes, it means that if we have useVirtualThreads set to true, than the executor used will be most probably
the org.apache.catalina.core.StandardVirtualThreadExecutor class for the executor.
right ?

Best Regards.

-----Original Message-----
From: Christopher Schultz <[email protected]>
Sent: lundi 3 novembre 2025 19:24
To: [email protected]
Subject: Re: Tomcat 10 and virtual thread

William,

On 11/3/25 11:15 AM, William Crowell wrote:
> I have never tried doing it through the executor like that.  How I enable virtual threads in server.xml is like this:
>
>   <Connector port="8080" protocol="HTTP/1.1"
>                 connectionTimeout="20000"
>                 redirectPort="8443"
>                 maxParameterCount="1000"
>                 useVirtualThreads="true" />


This uses <Connector> to auto-create an <Executor> The useVirtualThreads attribute just tells Tomcat to create an <Executor> that uses the virtual thread executor class.

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.