-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

John,

On 12/14/16 10:01 PM, John D. Ament wrote:
> I was feeling ambitious so I gave this a shot.  Here's what I
> changed: 
> https://github.com/johnament/tomcat85/commit/a0281b2d4e0fea7cb0f7a9d3c
d1e750b48498ff2

My
> 
tack was going to be to create an ExecutorService that didn't
dispatch. That way, less code has to change.

The problem with that approach is that, technically, the thread count
can change for a variety of reasons and it should behave correctly at
the time the contexts are started/stopped.

I'd be interested in some comments on changing the behavior of Tomcat
based upon the documentation of startStopThreads. For a value of "1",
it explicitly says that 1 thread will be used. I'd be surprised if
Tomcat were not to use a single (separate) thread rather than the main
thread.

Thing about this use-case: you have an embedded scenario where you
want to launch Tomcat and you expect the start() call to return fairly
soon so you can continue doing whatever you wanted to do. But instead
of using the "1 thread" to start all the contexts, it's using the
current thread and blocking you.

I'm wondering if we need to invent a new magic number for this.
Unfortunately, 0 is already taken. Perhaps we could use a non-numeric
value for this special case.

> I get some failed tests, but generallys eems good (I broke it
> earlier, and lots of things failed).
> 
> [concat] Testsuites with failed tests: [concat] 
> TEST-org.apache.catalina.session.TestStandardSessionIntegration.NIO.tx
t
>
> 
[concat]
> TEST-org.apache.catalina.session.TestStandardSessionIntegration.NIO2.t
xt
>
> 
[concat]
> TEST-org.apache.catalina.startup.TestHostConfigAutomaticDeployment.NIO
.txt
>
> 
[concat]
> TEST-org.apache.catalina.startup.TestHostConfigAutomaticDeployment.NIO
2.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NI
O.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NI
O2.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO.tx
t
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO2.t
xt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.interceptors.TestOrderIntercepto
r.NIO.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.interceptors.TestOrderIntercepto
r.NIO2.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetec
tor.NIO.txt
>
> 
[concat]
> TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetec
tor.NIO2.txt
>
> 
[concat]
> TEST-org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO.txt 
> [concat] 
> TEST-org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO2.txt
>
> 
[concat]
> TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfi
gurationParser.NIO.txt
>
> 
[concat]
> TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfi
gurationParser.NIO2.txt

These
> 
tests are very sensitive to environment. They always fail for me :)

> I'm wondering, can I publish local maven artifacts using the ant
> build?

You can always copy JARs from place to place. That's the extent of my
knowledge of Maven... really at all.

> Would be good to see if this fixes or changes my behavior.

You can take the catalina.jar from the output/build/lib directory and
overwrite the one in your test harness. That should work.

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

iQIcBAEBCAAGBQJYUvCCAAoJEBzwKT+lPKRYaBsQAMYXGyxbek5K1h5cGSlH8uCh
Lqj/c0yLEbCeFaLcqqUGw9zuDMs7VyfmARFFfYz/gezfs/bHOMFFlznbH4j3iTv9
K2JxsdvNzSbng/Pc/AjhnjKZz7bXM8Abg/hh0icRs8fUY16mZFNrdC3XGT9Mdcfj
clhbTlQPT582+EEVaOwwjEdZLQEk5iKuPleR9yzJSWqW9At/R3Nu8kA6ZuDP2o/v
tf3hir9nafWfFTrmHJatHrQUfQ+R+QBpOgHjVR+yStoHkGl6NACCy5WQqwy8FQ1f
+FgKq5qVE4aeSNXJ+l0wqqnwCNHZvXrqPLMcBbfqY7DWC5uOoSVtFQI/k9S8AE7v
YRq52G1ALzActhgCPQh4xmbnSkxsvRisl6q4NHTztNGMW1OgxYBUajr8gtKSAZ57
Iu4LvxATkc/xkr/Fs/qgMkNO+maIrxtGBm+RXrxm1pNmvNMz3xZfSUcHc6Jqii4e
2Tbur27Quz0qU6ZVurNiSPRSpZwWYhJVtZNeDsC8UB17gabppMzOOtyKY3n6bYrr
fpp4oW/91FLNAPpclUTmwBe0tZVDTnTvTfMZAUXAuXIYpgzijdAYh38xC17iqIYl
7VJiSMZVe1ajCyS8SmfCvVvi2Rvky1b8gy52fZ313auq7QzTv6NMGBOYwcV6Mzxh
pluxK0iMaMeC+rn1warX
=Ov3Q
-----END PGP SIGNATURE-----

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

Reply via email to