I tried to run full test on my box. JDK 1.6 with Maven 3.0.3.
I got the a check style error
cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java:492:33:
Nested if-else depth is 4 (max allowed is 3).
Audit done.
I checked the CI it doesn't have this error report. It looks like JDK
1.5 doesn't show this kind of error.
I just committed a work around[1] before we decide to change the check
style configuration file.
[1]http://svn.apache.org/viewvc?rev=1341332&view=rev
On Wed Apr 25 02:42:14 2012, [email protected] wrote:
Author: dkulp
Date: Tue Apr 24 18:42:14 2012
New Revision: 1329923
URL: http://svn.apache.org/viewvc?rev=1329923&view=rev
Log:
Merged revisions 1328463 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1328463 | ay | 2012-04-20 13:49:09 -0400 (Fri, 20 Apr 2012) | 2 lines
[CXF-4257] Should catch RejectedExecutionException in WS-Addr's
rebaseResponse
........
Modified:
cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Modified:
cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=1329923&r1=1329922&r2=1329923&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
(original)
+++
cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Tue Apr 24 18:42:14 2012
@@ -26,6 +26,7 @@ import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -475,12 +476,26 @@ public final class ContextUtils {
// pause dispatch on current thread ...
inMessage.getInterceptorChain().pause();
- // ... and resume on executor thread
- getExecutor(inMessage).execute(new Runnable() {
- public void run() {
+
+ try {
+ // ... and resume on executor thread
+ getExecutor(inMessage).execute(new Runnable() {
+ public void run() {
+
inMessage.getInterceptorChain().resume();
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ LOG.warning(
+ "Executor queue is full, use the caller
thread."
+ + " Users can specify a larger
executor queue to avoid this.");
+ // only block the thread if the prop is unset
or set to false, otherwise let it go
+ if (!MessageUtils.isTrue(
+ inMessage.getContextualProperty(
+
"org.apache.cxf.oneway.rejected_execution_exception"))) {
+ //the executor queue is full, so run the
task in the caller thread
inMessage.getInterceptorChain().resume();
}
- });
+ }
}
}
}
--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang