users@grizzly.java.net

Persistent tcp connection

From: Etienne Carouy <etienne.carouy_at_market-ip.com>
Date: Thu, 26 Jun 2008 14:40:41 +0200

Hi all,

 

I've working on an application that needs to manage a lot of socket in Java
and was interested in Grizzly.

The application is a GPRS server that received message from mobile device.
The connection is persistent because the device sent about 1 message / 5
minutes and that connection on GPRS network isn't free.

Currently, the application use normal socket and each device connected
consume one thread (more than 1000 threads).

 

I made some tests with grizzly but I got java.net.SocketException:
Connection reset by peer: socket write error.

This happens when the device sent a first message and wait 5 minutes to send
the second one. I suppose that the server close the connection because of no
sufficient activity.

 

Is it possible to force the connection to stay open on the server side?

 

Thanks in advance for your answer.

 

Etienne Carouy