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.

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.


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

Reply via email to