Servlets, Apache JServ and gcj/libgcj

Bryce McKinlay bryce@albatross.co.nz
Sun Nov 21 12:53:00 GMT 1999


Joerg Brunsmann wrote:

> P.S.: Since I'm a total idiot can someone please explain, why
> the libcj ServerSocket implementation complains about
>
> Exception creating the server socket: java.net.BindException: SocketImpl.bind: Error 0
>
> after stopping the JServ servlet engine with Ctrl-C wheras the
> same program executed with a java vm starts again without
> complaining. Netstat says that the state is TIME_WAIT.

When you kill a libgcj app with Ctrl-C, it often seems to take a while for all its
threads to actually die. You
can see this on programs which are continuously writing to System.out - after you press
ctrl-c the data
keeps coming for a second or two. If you have a server app, it sometimes takes 10 seconds
or mroe for
the kernel to release the sockets your app was using. If your program exits with
System.exit(), though,
there doesn't seem to be a problem.

regards

  [ bryce ]




More information about the Java mailing list