I switched to using Jetty and I had the same problem -- the process
didn't terminate. So I figured out that it was my fault by creating a
deadlock. I removed that and now the process terminates when calling
System.exit(0). So then I went and tried Simple again and it too now
terminates.
I then tried removing the call to System.exit(0) to see if the
process would exit naturally. It doesn't with Simple and does with
Jetty. Hence, the bug with Simple seems confirmed.
Hypothetically, if I wanted to continue to use Simple, it is OK to
call System.exit(0) and still terminate "gracefully"?
- Paul
On Jan 10, 2008, at 5:31 AM, Kevin Conaway wrote:
Bug the Simple developers. I am absolutely astonished that they
don't provide a clean way to shut down their server.
On Jan 10, 2008 2:59 AM, Paul J. Lucas < [EMAIL PROTECTED]> wrote:
Well, I just tried calling System.exit(0) and nothing happens: the
process doesn't exit. FYI: I'm using the Simple HTTP server. There
are a bunch of threads stuck in wait().
How can I shutdown the server and cause the process to exit?
- Paul
On Jan 9, 2008, at 11:43 PM, Paul J. Lucas wrote:
> When I start my server, I have:
>
> component = new Component();
> // ...
> component.start();
>
> To shutdown a server, I assume I do:
>
> component.stop();
>
> However, the process doesn't stop. Should I then simply do:
>
> System.exit( 0 );
>
> ?