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 2011/07/01 05:35:20 UTC

svn commit: r1141787 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java

Author: ffang
Date: Fri Jul  1 03:35:20 2011
New Revision: 1141787

URL: http://svn.apache.org/viewvc?rev=1141787&view=rev
Log:
[CXF-3627]add a log in OneWayProcessorInterceptor to indicate the executor queue is full and have to use the 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=1141787&r1=1141786&r2=1141787&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 Fri Jul  1 03:35:20 2011
@@ -22,8 +22,10 @@ package org.apache.cxf.interceptor;
 import java.io.IOException;
 import java.util.concurrent.Executor;
 import java.util.concurrent.RejectedExecutionException;
+import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.io.DelegatingInputStream;
 import org.apache.cxf.message.Exchange;
@@ -41,6 +43,7 @@ import org.apache.cxf.workqueue.WorkQueu
 public class OneWayProcessorInterceptor extends AbstractPhaseInterceptor<Message> {
     public static final String USE_ORIGINAL_THREAD 
         = OneWayProcessorInterceptor.class.getName() + ".USE_ORIGINAL_THREAD"; 
+    private static final Logger LOG = LogUtils.getL7dLogger(OneWayProcessorInterceptor.class);
     
     public OneWayProcessorInterceptor() {
         super(Phase.PRE_LOGICAL);
@@ -116,6 +119,9 @@ public class OneWayProcessorInterceptor 
                     }
                 } catch (RejectedExecutionException e) {
                     //the executor queue is full, so run the task in the caller thread
+                    LOG.warning(
+                        "the executor queue is full, run the oneway invocation task in caller thread." 
+                        + "Users can specify a larger executor queue to avoid this.");
                     chain.resume();
                 } catch (InterruptedException e) {
                     //ignore - likely a busy work queue so we'll just let the one-way go