You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Horia Muntean <ho...@gmail.com> on 2005/06/08 22:40:45 UTC

Strange situation reloaded

Sorry for any message duplicates, but it seems that my first email did
not arrive at the mail list. Here it is:

Hello,

I have one more strange situation. I have extended a bit the Reverser
example to build my server. I have only one client that connects to
the server.It is true that this client does not use NIO or MINA; it
works using classic streamed I/O:

final PrintWriter writer = new PrintWriter(socket.getOutputStream(), true);
final BufferedReader reader = new BufferedReader(new
InputStreamReader(socket.getInputStream()));

The client, after opening the socket sends the login string to the
server and the server in case of succesfull authentication sends OK to
the client.

Also, the client sends every minute a heartbeat message to the server.
When the server receives this message just replies back to the client.
The client uses socket.setSoTimeout(120*1000) in order to detect if
the connection is idle.

But sometimes, after random running time, the client gets disconnected
due to a read timeout exception. I am able to open the connection
again, but the first read with String line = reader.readLine(); fails
with read timeout exception. On the server side, if I remember
corectly when I was using mina-0.7.1-SNAPSHOT.jar none of the
ProtocolHandler callback was called, but now after swiching to
mina-0.7.2 only sessionCreated gets called, but nothing further.

Regards,
Horia

Re: Strange situation reloaded

Posted by Trustin Lee <tr...@gmail.com>.
Hello,
 Could you please give us some test code so that we can reproduce it? This 
kind of issue is quire hard to track, so we need to test by ourselves step 
by step.
 Thanks in advance,
Trustin

 2005/6/9, Horia Muntean <ho...@gmail.com>: 
> 
> Sorry for any message duplicates, but it seems that my first email did
> not arrive at the mail list. Here it is:
> 
> Hello,
> 
> I have one more strange situation. I have extended a bit the Reverser
> example to build my server. I have only one client that connects to
> the server.It <http://server.It> is true that this client does not use NIO 
> or MINA; it
> works using classic streamed I/O:
> 
> final PrintWriter writer = new PrintWriter(socket.getOutputStream(), 
> true);
> final BufferedReader reader = new BufferedReader(new
> InputStreamReader(socket.getInputStream()));
> 
> The client, after opening the socket sends the login string to the
> server and the server in case of succesfull authentication sends OK to
> the client.
> 
> Also, the client sends every minute a heartbeat message to the server.
> When the server receives this message just replies back to the client.
> The client uses socket.setSoTimeout(120*1000) in order to detect if
> the connection is idle.
> 
> But sometimes, after random running time, the client gets disconnected
> due to a read timeout exception. I am able to open the connection
> again, but the first read with String line = reader.readLine(); fails
> with read timeout exception. On the server side, if I remember
> corectly when I was using mina-0.7.1-SNAPSHOT.jar none of the
> ProtocolHandler callback was called, but now after swiching to
> mina-0.7.2 only sessionCreated gets called, but nothing further.
> 
> Regards,
> Horia
> 



-- 
what we call human nature is actually human habit
--
http://gleamynode.net/