If jooby.stop is called twice a null pointer exception is thrown:
java.lang.NullPointerException
at io.jooby.internal.RouterImpl.destroy(RouterImpl.java:430)
at io.jooby.Jooby.stop(Jooby.java:642)
...
I'm assuming somewhere jooby 2.0 registers a java.lang.Runtime shutdown hook. Ignoring various race conditions our problem is we will shutdown all services that need shutdown on the Runtime hook as well.
We could differentiate from runtime shutdown and manual shutdown of the service but that would not be desirable as it would probably be brittle (again race conditions).
If jooby.stop is called twice a null pointer exception is thrown:
I'm assuming somewhere jooby 2.0 registers a
java.lang.Runtimeshutdown hook. Ignoring various race conditions our problem is we will shutdown all services that need shutdown on the Runtime hook as well.We could differentiate from runtime shutdown and manual shutdown of the service but that would not be desirable as it would probably be brittle (again race conditions).