[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-user
Subject:    Connection timeout and HttpServlet read block.
From:       fhunter <fhunter () accuwater ! com>
Date:       2004-12-14 23:54:37
Message-ID: 41BF7D3D.8080409 () accuwater ! com
[Download RAW message or body]

What is the correct way to handle session timeout connections on Servlets?
This is our situation:
Tomcat is setup with a session timeout of 60secs.
Our application makes a connection. It receives a response and ends the 
connection.
(We wait, don't do any request for 61secs)
Then our application tries to make another request. The connection gets 
established and received by the servlet doGet method. I can read the 
header form the request, and even the content length of the message. 
Then I attempt to do a read on the inputStream buffer for the request 
and the read blocks.

The code works fine if we make connections with in the 60s time.
I can set the Http Connection: header parameter to close. And everything 
works as expected. I can make a connection at any time.

But if I wanted to take advantage of Http1.1 and keepalive connections 
what would be the proper way to deal with the connection time out problem?

Thanks in advance


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic