You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/04/24 20:42:18 UTC
svn commit: r1329924 -
/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Author: dkulp
Date: Tue Apr 24 18:42:18 2012
New Revision: 1329924
URL: http://svn.apache.org/viewvc?rev=1329924&view=rev
Log:
Merged revisions 1328598 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1328598 | ay | 2012-04-21 03:24:21 -0400 (Sat, 21 Apr 2012) | 2 lines
[CXF-4257] add an option for RejectedExecutionException handling for onway
........
Modified:
cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=1329924&r1=1329923&r2=1329924&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java (original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java Tue Apr 24 18:42:18 2012
@@ -150,11 +150,17 @@ public class OneWayProcessorInterceptor
lock.wait(20);
}
} catch (RejectedExecutionException e) {
- //the executor queue is full, so run the task in the caller thread
LOG.warning(
"Executor queue is full, run the oneway invocation task in caller thread."
+ " Users can specify a larger executor queue to avoid this.");
- chain.resume();
+ // only block the thread if the prop is unset or set to false, otherwise let it go
+ if (!MessageUtils.isTrue(
+ message.getContextualProperty(
+ "org.apache.cxf.oneway.rejected_execution_exception"))) {
+ //the executor queue is full, so run the task in the caller thread
+ chain.resume();
+ }
+
} catch (InterruptedException e) {
//ignore - likely a busy work queue so we'll just let the one-way go
}