You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/08 14:15:49 UTC
svn commit: r702819 - in
/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http:
endpoints/HttpConsumerEndpoint.java processors/ConsumerProcessor.java
Author: gnodet
Date: Wed Oct 8 05:15:49 2008
New Revision: 702819
URL: http://svn.apache.org/viewvc?rev=702819&view=rev
Log:
SM-1407: fix problem when resuming the continuation fail
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java?rev=702819&r1=702818&r2=702819&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java Wed Oct 8 05:15:49 2008
@@ -239,6 +239,13 @@
exchanges.put(exchange.getExchangeId(), exchange);
// Resume continuation
cont.resume();
+ if (!cont.isResumed()) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Could not resume continuation for exchange: " + exchange.getExchangeId());
+ }
+ exchanges.remove(exchange.getExchangeId());
+ throw new Exception("HTTP request has timed out for exchange: " + exchange.getExchangeId());
+ }
}
}
@@ -315,9 +322,7 @@
throw new IllegalStateException("Exchange not found");
}
if (!cont.isResumed()) {
- Exception e = new Exception("Exchange timed out: " + exchange.getExchangeId());
- fail(exchange, e);
- throw e;
+ throw new Exception("Exchange timed out: " + exchange.getExchangeId());
}
}
}
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java?rev=702819&r1=702818&r2=702819&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java Wed Oct 8 05:15:49 2008
@@ -103,6 +103,13 @@
}
exchanges.put(exchange.getExchangeId(), exchange);
cont.resume();
+ if (!cont.isResumed()) {
+ if (log.isDebugEnabled()) {
+ log.debug("Could not resume continuation for exchange: " + exchange.getExchangeId());
+ }
+ exchanges.remove(exchange.getExchangeId());
+ throw new Exception("HTTP request has timed out for exchange: " + exchange.getExchangeId());
+ }
}
}
@@ -179,8 +186,6 @@
}
if (!cont.isResumed()) {
Exception e = new Exception("Exchange timed out: " + exchange.getExchangeId());
- exchange.setError(e);
- channel.send(exchange);
sendFault(new SoapFault(e), request, response);
return;
}