> I'm trying to make it as resilient as possible. One scenario I've
found
> is where a connection is successfully made to a server, then network
> connectivity is lost. If I try and send a message to the server
> immediately after this, the client just hangs. I was hoping to add a
> timeout to the code that actually sends the message and receives a
> response, but looking through the Net, examples use either TimerTask
or
> ExecutorService objects which - due to their being inner classes -
mean
> that I can't seem to get a hold on the response object to return.

I have fixed the problem using an ExecutorService with a timeout and a
class that implements Callable.

Mark

Reply via email to