Shutdown hook for Ratpack?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Shutdown hook for Ratpack?

dbirtwell
All:

I'm wondering if there is some sort of shutdown hook for Ratpack so one can free resources, such as DB connections?

I thought of running the whole script or app inside a try/catch/finally block, but that just feels wrong.

Any ideas?

Dave
Reply | Threaded
Open this post in threaded view
|

Re: Shutdown hook for Ratpack?

Luke Daley
Administrator
Interesting idea. There's nothing at the moment.

Most of the time, the app is going to be shutdown as the JVM is terminating. I've added https://github.com/ratpack/ratpack/issues/67 as a feature request for a hook regardless.
Reply | Threaded
Open this post in threaded view
|

Re: Shutdown hook for Ratpack?

dbirtwell
Luke:

Thanks!

Dave