You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2009/06/18 09:01:57 UTC
svn commit: r785932 -
/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Author: ffang
Date: Thu Jun 18 07:01:56 2009
New Revision: 785932
URL: http://svn.apache.org/viewvc?rev=785932&view=rev
Log:
[CXF-2299]should catch RejectedExecutionException in OneWayProcessorInterceptor and run the task in caller thread
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=785932&r1=785931&r2=785932&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java Thu Jun 18 07:01:56 2009
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Endpoint;
@@ -77,12 +78,17 @@
}
if (Boolean.FALSE.equals(o)) {
chain.pause();
- message.getExchange().get(Bus.class).getExtension(WorkQueueManager.class)
+ try {
+ message.getExchange().get(Bus.class).getExtension(WorkQueueManager.class)
.getAutomaticWorkQueue().execute(new Runnable() {
public void run() {
chain.resume();
}
});
+ } catch (RejectedExecutionException e) {
+ //the executor queue is full, so run the task in the caller thread
+ chain.resume();
+ }
}
}
}