I have a java program that has to listen to the server-socket infinitely I go abnormally through killing JVM In case of going to, what happens to system resources in this case, socket object? Will the sockets be released or will it be closed?
In the case of unusual JVM exit, what is the best way to clean system resources like system descriptor / network socket / JDBC connection
I know in the end, in the end, but Finally, some uncertainty and performance have declined.
Pls provide some ideas
In case of unusual exits, of course That JVM can not do anything especially that it has been allocated. This responsibility comes next to the operating system.
For sockets, modern operating systems will certainly leave any socket that was opened by the crashing process. The same applies to files and any other kernel object (JDBC connections are applied with a socket).
If JVM is abnormally finished then the final form will not be run.
Comments
Post a Comment