What we are already doing is that JVM can respawn itself from the last own shutdown hook running. It strongly depends on proper closing of all resources and ports. And here comes the problem - all ports are open/closed by the application, except the debug port. That is open with the start of the JVM, and closed with its death.
Is it possible to open/close the debug port somehow from the inside of the application, not just using command line options?