Author: dkulp
Date: Thu Oct 6 16:15:00 2011
New Revision: 1179687
URL: http://svn.apache.org/viewvc?rev=1179687&view=rev
Log:
If the executor rejects the request, just run on the local thread and
warn.
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Messages.properties
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1179687&r1=1179686&r2=1179687&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu Oct 6 16:15:00 2011
@@ -37,6 +37,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -1515,7 +1516,12 @@ public class HTTPConduit
outMessage.getExchange().put(Executor.class.getName()
+ ".USING_SPECIFIED",
Boolean.TRUE);
}
- ex.execute(runnable);
+ try {
+ ex.execute(runnable);
+ } catch (RejectedExecutionException rex) {
+ LOG.warning("EXECUTOR_FULL");
+ handleResponseInternal();
+ }
}
}
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Messages.properties
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Messages.properties?rev=1179687&r1=1179686&r2=1179687&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Messages.properties
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Messages.properties
Thu Oct 6 16:15:00 2011
@@ -25,4 +25,5 @@ DECOUPLED_RESPONSE_FAILED_MSG = Decouple
MISSING_PATH_INFO = PATH_INFO not present in message context, multiplex id is
unavailable. Ensure the portName passed to getCurrentEndpointReferenceId is
correct if the service has multiple ports
INVALID_ENCODING_MSG = Invalid character set {0} in request.
INVALID_TIMEOUT_FORMAT = Invalid name/value pair {0}={1} set in RequestConext
-NO_HTTP_DESTINATION_FACTORY_FOUND = Cannot find any registered
HttpDestinationFactory from the Bus.
\ No newline at end of file
+NO_HTTP_DESTINATION_FACTORY_FOUND = Cannot find any registered
HttpDestinationFactory from the Bus.
+EXECUTOR_FULL = Executor rejected background task to retrieve the response,
running on current thread.
\ No newline at end of file