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

John,

On 12/7/16 7:19 AM, John D. Ament wrote:
> On Wed, Dec 7, 2016 at 3:58 AM Mark Thomas <ma...@apache.org>
> wrote:
> 
>> On 06/12/2016 02:59, John D. Ament wrote:
>> 
>> <snip/>
>> 
>>> So I was able to identify my issue.  It's not specifically a
>>> tomcat problem, but tomcat's bootstrapping makes it unique.
>>> 
>>> one of the issues I've observed is that Tomcat's use of
>>> multithreading causes some thread deadlocking with some
>>> synchronized blocks.  I was wondering if there's a way to turn
>>> that off?  Make tomcat's bootstrap happen in the same thread as
>>> the original invocation?
>> 
>> What exactly do you mean by Tomcat's bootstrapping? Can you give
>> an example of concurrent execution that is causing issues?
>> 
> 
> I instantiate the Tomcat object and invoke start() on the "main"
> thread. The invocation of ServletContextListeners happens on a 
> "localhost-startStop-1" thread.  I would like to have that
> invocation happen on the main thread instead.

Hmm... there is the "startStopThreads" setting on the Engine, but
unfortunately there is not (currently available) setting that says
"don't use multiple threads at all". It looks like Tomcat is always
going to use at least one (separate) thread to launch the various
Hosts (and webapps).

> Its nothing within tomcat that is deadlocking, but under the covers
> weld has a synchronized block, its inside that synchronized block
> where Tomcat is instantiated.  There's a later point where Weld
> tries getting a lock again.  In that case, when its single threaded
> (in other containers) it passes since it has a lock, but in this
> case it can't get that lock.

Is there any way for you to remove the required monitor on your own
code? Or is Weld so intricately-involved in the whole process that
unwinding it isn't possible?

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

iQIcBAEBCAAGBQJYSCkWAAoJEBzwKT+lPKRYIUcP/2lSnNrqoW4XXUKuFVLJXijl
w/+TiQz58pjo7KCpXzRC6ubBPIQNO5Hj5HbukXuglNJfaWbEnoIdf9zlSOElg13a
t+Pc4OFvdFYc0uzMf5E824AvXeLR5A4SAuMxzzg86DEdJZiAW4MwEoY/UduPN1b6
PQM74JS5iXNTGQjaNZQfonS26Gsrwi69fnC+evcJ/RDGZxUIq/NAZVU1zD0wjAAh
p0dzvRqkO5XjirCF8xyUgoUIHn1LdygZrOMkDby3XY23/nQVN+JxmlPDc/Lwl+nt
a2Ywkw0D5ATkHBzqZC8ksmkFVWIiGKMZacOBKci5sv+APdTzohpAUicleZ+bQB6l
tYkTwhmqkAn27B1Zj+ev7efAz+LbjyKzBGHLztD3r+lhkfBRJrotprEIA5MWXLiD
SLrBwXcJqSLkipoKDpCwrkBHrMnHTUi1M7NyLDXSgRw/ynJfoUnN/FjssNft7K09
RtxMktXqD3FBX74tIbEUmdU5OmEGAuSIiOrjKyYgH8vXmyqo44kIw9c8EapY1mVS
FQurOjEOXO+rk5TnWWOvT22pcH3sgfH486YaaiUJ0tW7DraQFOIqVq2jlb/tSwW7
Yai218JiEQJRR1ps+ZZyXqhsSVfTJ8CSnGDsWROJuMSO7roBJQXbutftAJjxHC0M
V7Mfo/Q2YhRhrL1fPcuW
=jiLD
-----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