I had been getting a series of occasional stack dumps from the altrmi
code when using it
to connect to an InstrumentManager from a client. I think that I got
them all worked out.

1) There was a couple places where data was not being read fully:
ServerCustomStreamReadWriter.readRequest()
ClientCustomStreamReadWriter.readReply()

Paul, could you take a look at these two changes and make sure that you
agree with them
I assume that some of the other transports may also have similar problems.

2) Even after the above fixes, I was getting EOFExceptions once in a
while on the server
resulting in a stack dump. The stack dump was simply because the case
was not being
caught. It is not interpreted as the connection being closed.
StreamServerConnection.run()

3) This last one took me a while. Why was the EOFException taking place.
It turns out
that the client was closing the connection. The connection was being
closed due to a
InterruptedIOException: Read timed out. This was caused because the
socket so timeout
was being set to 1 second. When the system was slow, the read would
sometimes take 1.1
seconds or a little more, resulting in a timeout and disconnect.
I fixed this by changing the timeout to 60 seconds. I wanted to make
sure that there was
not a reason why this had been set to 1 second? Even at 1 minute, it
seems possible that
this could cause problems. Esp if the remote method takes some time to
execute. If it is
not needed, it might be best just to remove the timeout completely.
AbstractSocketStreamInvocationHandler.makeSocket()
Doing a search, there are 3 other places where a so timeout is being set
to 36 seconds.

Anyway, give these changes a try and let me know if they caused any
problems.

Cheers,
Leif


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to