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:20:21 GMT
> -----Original Message-----
> From: Chema [mailto:demablogia@gmail.com]
> Sent: Tuesday, February 07, 2012 5:12 PM
> To: Tomcat Users List
> Subject: Re: Shutdown Hooks not firing when tomcat is shutdown from
> within a webapp
> 
> >> Can I see ApplicationShutdownHooks source code ?
> >
> > That is located in java.lang, you can see the source online...
> >
> 
> Sorry, I meant about *your* app's shutdown hook.
> 

For debugging I'm only using this, and it does run successfully. The
shutdown hook is not blocking anything,

Runtime.getRuntime().addShutdownHook(
	new Thread(new Runnable(){
		@Override
		public void run() {
			System.out.println("HARI-KIRI SUCCESSFUL!");
		}
	}, "shutdownHook"));

> >> What 's com.evertz.registry.ServerRegistryListener ?
> 
> Right
> 
> >
> > 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


Mime
View raw message