Author: thomas.diesler(a)jboss.com
Date: 2007-03-18 04:37:19 -0400 (Sun, 18 Mar 2007)
New Revision: 2637
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
Log:
Prevent endless loop on async exception
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-03-18
00:27:03 UTC (rev 2636)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-03-18
08:37:19 UTC (rev 2637)
@@ -334,15 +334,17 @@
Map<String, Object> resContext = response.getContext();
Object result = invokeInternal(payload, resContext);
response.set(result);
-
- // Call the handler if available
- if (handler != null)
- handler.handleResponse(response);
}
catch (Exception ex)
{
handleAsynInvokeException(ex);
}
+ finally
+ {
+ // Call the handler if available
+ if (handler != null)
+ handler.handleResponse(response);
+ }
}
// 4.18 Conformance (Failed Dispatch.invokeAsync): When an operation is invoked
using an invokeAsync
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2007-03-18
00:27:03 UTC (rev 2636)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2007-03-18
08:37:19 UTC (rev 2637)
@@ -58,6 +58,9 @@
if (delegate == null)
throw new IllegalStateException("Future not available");
+ if (exception != null)
+ throw exception;
+
return delegate;
}
@@ -87,7 +90,7 @@
{
getFuture().get();
}
-
+
if (exception != null)
throw new ExecutionException(exception);