What JDK are you using? Please consider producing a context/wire log + the exception trace. See logging guide for details
http://jakarta.apache.org/commons/httpclient/3.0/logging.html Oleg On Wed, 2004-12-01 at 12:03 -0800, Angie Lin wrote: > I'm specifying a completely non-existent url to test the connection > timeout. That should work, right (i.e. non-existent url)? > > Anyways, it doesn't appear to work even though I'm setting the > connection timeout on client, connection manager, AND the method. > > Angie > > > On Dec 1, 2004, at 11:57 AM, Oleg Kalnichevski wrote: > > > Angie, > > > > You are not confusing socket (read) timeout with connect (establish > > connection) timeout, are you? To my knowledge timeouts work as > > advertised. > > > > Oleg > > > > On Wed, 2004-12-01 at 11:23 -0800, Angie Lin wrote: > >> Do the timeouts work? > >> > >> I've tried: > >> > >> int CONN_TIMEOUT=10000; > >> HttpClient client=new HttpClient(); > >> // set timeout on client > >> client.setConnectionTimeout(CONN_TIMEOUT); > >> client.getParams().setParameter("http.connection.timeout", > >> new Integer(CONN_TIMEOUT)); > >> > >> // set timeout on connection manager > >> > >> client.getHttpConnectionManager().getParams().setParameter("http.conne > >> ct > >> ion.timeout", > >> new > >> Integer(CONN_TIMEOUT)); > >> > >> // set timeout on method > >> GetMethod get=new > >> GetMethod("http://some.nonexistent.com/somepage.html"); > >> get.getParams().setParameter("http.connection.timeout", new > >> Integer(CONN_TIMEOUT)); > >> get.setHttp11(true); > >> > >> client.executeMethod(get); > >> > >> > >> But it still takes roughly 3 minutes instead of the 10 seconds I > >> expected. Is there a different way for specifying the timeout? > >> > >> -- > >> Angie Lin > >> > >> > >> > >> > >> > >> --------------------------------------------------------------------- > >> 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] > > > > > > > > > > > > > !DSPAM:41ae23c6236441107652777! > > > --------------------------------------------------------------------- > 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]
