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 14:09:52 UTC

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

Author: ffang
Date: Thu Jun 18 12:09:52 2009
New Revision: 786029

URL: http://svn.apache.org/viewvc?rev=786029&view=rev
Log:
Merged revisions 786018 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r786018 | ffang | 2009-06-18 19:23:41 +0800 (Thu, 18 Jun 2009) | 9 lines
  
  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.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=786029&r1=786028&r2=786029&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java Thu Jun 18 12:09:52 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;
@@ -78,12 +79,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();
+                }
             }
         }
     }