tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Kujtan" <akuj...@evertz.com>
Subject RE: Shutdown Hooks not firing when tomcat is shutdown from within a webapp
Date Tue, 07 Feb 2012 22:01:30 GMT


> -----Original Message-----
> From: Chema [mailto:demablogia@gmail.com]
> Sent: Tuesday, February 07, 2012 4:51 PM
> To: Tomcat Users List
> Subject: Re: Shutdown Hooks not firing when tomcat is shutdown from
> within a webapp
> 
> > "Asynchronous Notification 'interface
> com.evertz.registry.ServerRegistryListener: masterChanged'" daemon
> prio=6 tid=0x28c77000 nid=0x16d8 in Object.wait() [0x2899f000]
> >   java.lang.Thread.State: WAITING (on object monitor)
> >        at java.lang.Object.wait(Native Method)
> >        - waiting on <0x08bc3ac0> (a
> org.apache.catalina.startup.Catalina$CatalinaShutdownHook)
> >        at java.lang.Thread.join(Thread.java:1143)
> >        - locked <0x08bc3ac0> (a
> org.apache.catalina.startup.Catalina$CatalinaShutdownHook)
> >        at java.lang.Thread.join(Thread.java:1196)
> >        at
> java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.ja
> va:79)
> >        at
> java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:
> 24)
> >        at java.lang.Shutdown.runHooks(Shutdown.java:79)
> >        at java.lang.Shutdown.sequence(Shutdown.java:123)
> >        at java.lang.Shutdown.exit(Shutdown.java:168)
> >        - locked <0x23c8bf68> (a java.lang.Class for
> java.lang.Shutdown)
> >        at java.lang.Runtime.exit(Runtime.java:90)
> >        at java.lang.System.exit(System.java:904)
> 
> Can I see ApplicationShutdownHooks source code ?

That is located in java.lang, you can see the source online...

> What 's com.evertz.registry.ServerRegistryListener ?

This is just the listener that triggers the shutdown call. 
That the trace shows it that I call System.exit(0), which then runs the shutdown hooks, but
then gets stuck running the CatalinaShutdownHook. It looks like all CatalinaShutdownHook does
is call catalina.stop, I don't really know how to figure out what it is waiting on though.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


Mime
View raw message