Hi,
John C. Turnbull wrote:
> I have Comet working nicely between servlets and applets except for one
> thing.
Great!
For some reason, if a connection is left idle for several
> minutes then the data sent from the servlet seems to disappear into the
> ether somewhere.
Do you know how long exactly?
There are no exceptions in either the servlet or the
> applet and the servlet really believes it is sending data down the
> pipe. However, it just never arrives in the DataInputStream that the
> applet uses to communicate with the servlet.
Do you have a test case I can take a look at? Do you know if the
connection is still active (are you handling the onInterrupt/onTerminate
method of the CometHandler)?
>
>
>
> This is bad because there doesn’t appear to be any way I can detect when
> this is occurring in the program and do something about it. All I can
> come up with is to do a reconnect if the connection is idle for a
> certain period of time in the hope that this will prevent the problem
> from ever happening. I cannot say exactly how long the idle time is but
> it appears to be at least 10 minutes.
Agree this is not a solution :-)
I have the following line in the
> servlet:
>
>
>
> context.setExpirationDelay(-1);
>
>
>
> which I thought would mean that no timeouts would be happening.
>
Right, this is exactly what it is supposed to do.
>
>
> Any ideas what’s actually happening here and where the data is going?
Difficult to say. Are they any exceptions in the log (I guess not). Do
you know if the bytes are sent over the network? A tool like wireshark
or ngrep could help determining if the server or the client have problem.
Thanks
-- Jeanfrancois
>
>
>
> Thanks,
>
>
>
> -JCT
>