cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1341332 - /cxf/branches/2.5.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Date Tue, 22 May 2012 07:39:37 GMT
Author: ningjiang
Date: Tue May 22 07:39:37 2012
New Revision: 1341332

URL: http://svn.apache.org/viewvc?rev=1341332&view=rev
Log:
Fix the CS error of ContextUtils

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=1341332&r1=1341331&r2=1341332&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 May 22 07:39:37 2012
@@ -466,35 +466,34 @@ public final class ContextUtils {
                         if (in != null) {
                             in.cacheInput();
                         }
-                        
-                        if (!robust) {
-                            // async service invocation required *after* a response
-                            // has been sent (i.e. to a oneway, or a partial response
-                            // to a decoupled twoway)
+                        try {
+                            if (!robust) {
+                                // async service invocation required *after* a response
+                                // has been sent (i.e. to a oneway, or a partial response
+                                // to a decoupled twoway)
                         
         
-                            // pause dispatch on current thread ...
-                            inMessage.getInterceptorChain().pause();
+                                // pause dispatch on current thread ...
+                                inMessage.getInterceptorChain().pause();
 
 
-                            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();
-                                }
+                                    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();
                             }
                         }
                     }



Mime
View raw message