How to integrate Verticles stop method with JVM shutdown hook

17 views
Skip to first unread message

E. Ulrich Kriegel

unread,
Jun 1, 2022, 5:02:28 AM6/1/22
to vert.x
Hie there,

is a Verticles stop method already integrated with a JVMs shutdown hook or is thee an elegant way to do that. We wold like to save some statistics during shutdown and load id again during startup.

Thanks in advance

-- Ulrich

Thomas SEGISMONT

unread,
Jun 1, 2022, 9:57:20 AM6/1/22
to ve...@googlegroups.com
It depends ;-)

If you use the io.vertx.core.Launcher class to start your application, it creates a JVM shutdown hook automatically.

If you create your own main method to start vert.x, you must do it yourself.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/c6ed92d1-4ac1-40a1-878a-ae02d0a35038n%40googlegroups.com.
Message has been deleted

E. Ulrich Kriegel

unread,
Jun 1, 2022, 12:46:31 PM6/1/22
to vert.x
It works, my mistake was a @Override instead of calling super.stop as last action
Reply all
Reply to author
Forward
0 new messages