Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Shutdown hook for Jetty 9(Is there a hook to call a function after jetty has completed its shutdown)
Shutdown hook for Jetty 9 [message #1445502] Wed, 15 October 2014 14:26 Go to next message
John Preston is currently offline John PrestonFriend
Messages: 2
Registered: October 2014
Junior Member
Can someone say how I might implement a function that gets called when jetty 9 has shutdown. I cannot use the context destroy function because this gets called if the webapp s being refreshed. I need a function that gets called just before jetty shuts down completely.
Re: Shutdown hook for Jetty 9 [message #1445573 is a reply to message #1445502] Wed, 15 October 2014 16:24 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Use a lower level shutdown hook? http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Shutdown hook for Jetty 9 [message #1445716 is a reply to message #1445573] Wed, 15 October 2014 21:08 Go to previous messageGo to next message
John Preston is currently offline John PrestonFriend
Messages: 2
Registered: October 2014
Junior Member
My problem is that these shutdown hooks execute before the webapp contexts are destroyed and I need to have all the contexts destroyed before my functions runs. Also In the case where jetty is refreshing a context I don't want my code to execute, only when jetty is about to terminate and al the contexts are destroyed.
Re: Shutdown hook for Jetty 9 [message #1446164 is a reply to message #1445716] Thu, 16 October 2014 12:53 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
The Jetty project uses mailing lists for their community, not these forums. Here's the jetty-users list: https://dev.eclipse.org/mailman/listinfo/jetty-users
Previous Topic:Eclipse cannot find google 4.4 plugin
Next Topic:Eclipse Write Error
Goto Forum:
  


Current Time: Tue Apr 23 07:50:32 GMT 2024

Powered by FUDForum. Page generated in 0.08601 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top