cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1371777 - /cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
Date Fri, 10 Aug 2012 17:29:26 GMT
Author: dkulp
Date: Fri Aug 10 17:29:25 2012
New Revision: 1371777

URL: http://svn.apache.org/viewvc?rev=1371777&view=rev
Log:
When using an async transport, make sure an exception is thrown on a timeout, not a null return;

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=1371777&r1=1371776&r2=1371777&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Fri Aug 10 17:29:25
2012
@@ -674,7 +674,7 @@ public class ClientImpl
         }
     }
 
-    protected void waitResponse(Exchange exchange) {
+    protected void waitResponse(Exchange exchange) throws IOException {
         int remaining = synchronousTimeout;
         while (!Boolean.TRUE.equals(exchange.get(FINISHED)) && remaining > 0)
{
             long start = System.currentTimeMillis();
@@ -689,6 +689,10 @@ public class ClientImpl
         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
             LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
                 exchange.get(OperationInfo.class).getName().toString());
+            String msg = new org.apache.cxf.common.i18n.Message("RESPONSE_TIMEOUT", LOG,

+                                                                exchange.get(OperationInfo.class).getName().toString())
+                .toString();
+            throw new IOException(msg);
         }
     }
 



Mime
View raw message