axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Swanson <m...@ScheduleWorld.com>
Subject PATCH: Fix Call.CONNECTION_TIMEOUT_PROPERTY
Date Wed, 23 Feb 2005 19:37:28 GMT
Hello,

There is a small typo that prevents socket connection timeouts from 
working: contains() should be containsKey().

I have tested the fix by using Axis to make rapid remote SOAP calls and 
unplugging my ethernet cable. If I time it just right (heh) I get the 
correct java.net.SocketTimeoutException: connect timed out so I know it 
works.

I have also attached the patch because Thunderbird seems to have 
destroyed the formatting.

Cheers.

--- DefaultSocketFactory.java.old       2005-02-23 14:29:49.000000000 -0500
+++ DefaultSocketFactory.java   2005-02-23 11:33:43.000000000 -0500
@@ -70,7 +70,7 @@
              throws Exception {

          int timeout = 0;
-        if(attributes != null && attributes.contains(CONNECT_TIMEOUT)) {
+        if(attributes != null && attributes.containsKey(CONNECT_TIMEOUT)) {
              timeout = 
Integer.parseInt((String)attributes.get(CONNECT_TIMEOUT));
          }
          TransportClientProperties tcp = 
TransportClientPropertiesFactory.create("http");

-- 
Free replacement for Exchange and Outlook (Contacts and Calendar)
http://www.ScheduleWorld.com/
WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb

Mime
View raw message