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:[EMAIL PROTECTED] > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
