Hi James/Oleg

     We get the HttpConnection object's reponseInputStream and create a 
objectinputstream  out of it and do a Read object on it.  The HttpConnection 
with webserver is always on and we doesnt close the connection. The issue is 
when the webserver pc is removed from network,  to the HttpConnection 
objectinputStream.readObj doesnt get any SocketException. I think Accessing 
stream of a HttpConnection which no longer exists should throw SocketException.

    James, as you said setting HttpConnection timeout should fix the issue. But 
ido have a session timer which kicks in at configured interval which 
disconnects and connects back freshly. So i didnt introduce timeout for 
HttpConnection.

Regards
Saravanan


--- On Mon, 3/16/09, James Abley <[email protected]> wrote:

> From: James Abley <[email protected]>
> Subject: Re: Regarding HttpConnection's inputstream.readObject()
> To: "HttpComponents Project" <[email protected]>, [email protected], 
> [email protected]
> Date: Monday, March 16, 2009, 8:33 AM
> 2009/3/13 saravanan <[email protected]>:
> >
> >  Hi,
> >
> >  We have a client, webserver and server based
> application(3 entities).
> >  We open ingress connection from server side using
> HttpConnection  objects with the webserver. The ingress
> connection is used  to getRequest from the
> HttpConnection's inputStream(of Tomcat). Tomcat will
> create socket object and does a relay  of request from
> Client to server and vice versa.
> >
> >  At server side For Ingress, we get InputStream of
> HttpConnection object and do a readObject() for receiving
> request.
> > The inputStream we use is ObjectInputStream.readObj().
> >
> >  The issue is when machine were webserver(Tomcat) is
> running gets  disconnected from network/network cable is
> pulled out, we  dont receive any socketException or
> IOException in  ObjectInputStream.readObj(). Thus we are
> unable to  recognize  that Tomcat is down.
> >
> >  Could you please assist me to resolve this.
> >
> > Regards
> > Saravanan
> >
> 
> This sounds more like a question for the user list than the
> developer
> list? Please continue any further discussion on the user
> list. I've
> copied it in.
> 
> Also, have you looked at the HttpClient API to set a
> timeout on the
> connection? I've found that tends to be a very useful
> thing to think
> about generally.
> 
> Cheers,
> 
> James




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to