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

List:       httpclient-users
Subject:    RE: Connection Reset by server
From:       Oleg Kalnichevski <olegk () apache ! org>
Date:       2005-02-10 21:13:55
Message-ID: 1108070035.4851.58.camel () localhost ! localdomain
[Download RAW message or body]

On Thu, 2005-02-10 at 10:04 +0530, N V Kameshwara Rao wrote:
> Hi ,
> 
>   One question on this point ...
>   What is the difference with  setting the DefaultHttpMethodRetryHandler at
> the client level like what Nit did
> and having a HttpMethodRetryHandler at the method level?

A method level parameter applies to that specific method. A client level
parameter applies to all the methods executed by the client, unless
overridden at the method level

See <http://jakarta.apache.org/commons/httpclient/3.0/preference-
api.html>

>    Is there any difference to the idempotency of the method?
> thanks,

No.

HTH

Oleg

> Kamesh
> 
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: Thursday, February 10, 2005 2:38 AM
> To: HttpClient User Discussion
> Cc: Nittala
> Subject: Re: Connection Reset by server
> 
> 
> Nit,
> 
> Please take a look at the HttpClient exception handling guide for some
> info on this problem and possible solutions:
> 
> http://jakarta.apache.org/commons/httpclient/3.0/exception-
> handling.html#HTTP%20transport%20safety
> 
> Hope this helps
> 
> Oleg
> 
> 
> On Thu, 2005-02-03 at 04:11 -0800, Nittala wrote:
> > Hi,
> >   Am using the Httpclient 3.0 with the
> > MultiThreadedConnectionManager. My server is Weblogic
> > 8.1 and the time out for idle connections is set to 60
> > seconds in weblogic.
> >
> >   However, when i try to communicate from my client
> > (Java Web Start using JDK1.3.1 Runtime), i often get
> > the Connection reset by peer _JVM exception.
> >
> > The code that i am using looks something like this.
> >
> >
> > mthcm = new MultiThreadedHttpConnectionManager();
> > client = new HttpClient(mthcm);
> > client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY);
> > client.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
> > new DefaultHttpMethodRetryHandler(4,false));
> >
> >
> > PostMethod   method =null;
> >
> > try{
> > 	method = new PostMethod(url);
> >
> > 	NameValuePair nvp = new NameValuePair("query",
> > input);
> >
> > 	method.addParameter(nvp);
> >
> >
> > 	int status = client.executeMethod(method);
> >
> >
> > 	if (status == HttpStatus.SC_OK) {
> >                 InputStream ins =
> > method.getResponseBodyAsStream();
> > 		ObjectInputStream objectinputstream = new
> > ObjectInputStream(ins);
> > 		obj = objectinputstream.readObject();
> > 		objectinputstream.close();
> > 		ins.close();
> > 	}else{
> > 	   method.getResponseBody();
> > 	}
> > }finally {
> > 	if (method != null)
> > 		method.releaseConnection();
> > 	return obj;
> > }
> >
> >
> >
> > Any pointer on where i am doing wrong will be of great
> > help.
> > thanks all,
> > Nit Tala
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - Find what you need with new enhanced search.
> > http://info.mail.yahoo.com/mail_250
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-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