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 13:23:41 UTC

svn commit: r786018 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java

Author: ffang
Date: Thu Jun 18 11:23:41 2009
New Revision: 786018

URL: http://svn.apache.org/viewvc?rev=786018&view=rev
Log:
Merged revisions 785932 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r785932 | ffang | 2009-06-18 15:01:56 +0800 (Thu, 18 Jun 2009) | 1 line
  
  [CXF-2299]should catch RejectedExecutionException in OneWayProcessorInterceptor and run the task in caller thread
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun 18 11:23:41 2009
@@ -1 +1 @@
-/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785620,785622-785624,785651,785734
+/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785620,785622-785624,785651,785734,785932

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=786018&r1=786017&r2=786018&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java (original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java Thu Jun 18 11:23:41 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();
+                }
             }
         }
     }