I may be off base a bit here, but non-daemon threads (the default) will prevent a program from terminating until they all close or are forcibly closed, including the main thread. Depending on the server software you're using there may be some built in system for shutting down