cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clecl...@apache.org
Subject svn commit: r893013 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/management/src/main/java/org/apache/cxf/management/interceptor/
Date Mon, 21 Dec 2009 22:23:18 GMT
Author: cleclerc
Date: Mon Dec 21 22:23:17 2009
New Revision: 893013

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

........
  r893011 | cleclerc | 2009-12-21 23:08:21 +0100 (Mon, 21 Dec 2009) | 4 lines
  
  [CXF-2540] JMX ResponseTimeFeature does not count client side exceptions
  - add FaultMode entry to the exchange in ClientFaultConverter
  - Change ResponseTimeMessageInInterceptor phase registration from RECEIVE to POST_LOGICAL
  - Register ResponseTimeMessageInInterceptor in the InFaultInterceptor list
........

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

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 21 22:23:17 2009
@@ -1 +1 @@
-/cxf/trunk:891375-891393,891452,891817,891827,891859,891945-891946,892056,892307,892360,892664,892890,892920,892953,892988
+/cxf/trunk:891375-891393,891452,891817,891827,891859,891945-891946,892056,892307,892360,892664,892890,892920,892953,892988,893011

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

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java?rev=893013&r1=893012&r2=893013&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
Mon Dec 21 22:23:17 2009
@@ -43,6 +43,7 @@
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
@@ -79,6 +80,22 @@
             processFaultDetail(fault, msg);
             setStackTrace(fault, msg);
         }
+
+        FaultMode faultMode = FaultMode.UNCHECKED_APPLICATION_FAULT;
+
+        // Check if the raised exception is declared in the WSDL or by the JAX-RS resource
+        Method m = msg.getExchange().get(Method.class);
+        if (m != null) {
+            Exception e = msg.getContent(Exception.class);
+            for (Class<?> cl : m.getExceptionTypes()) {
+                if (cl.isInstance(e)) {
+                    faultMode = FaultMode.CHECKED_APPLICATION_FAULT;
+                    break;
+                }
+            }
+        }
+        
+        msg.getExchange().put(FaultMode.class, faultMode);
     }
 
     protected void processFaultDetail(Fault fault, Message msg) {

Modified: cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java?rev=893013&r1=893012&r2=893013&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
Mon Dec 21 22:23:17 2009
@@ -33,6 +33,7 @@
     @Override
     protected void initializeProvider(InterceptorProvider provider, Bus bus) {
         provider.getInInterceptors().add(IN);
+        provider.getInFaultInterceptors().add(IN);
         provider.getInInterceptors().add(INVOKER);
         provider.getOutInterceptors().add(OUT);
         

Modified: cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java?rev=893013&r1=893012&r2=893013&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
Mon Dec 21 22:23:17 2009
@@ -28,7 +28,7 @@
 public class ResponseTimeMessageInInterceptor extends AbstractMessageResponseTimeInterceptor
{
     
     public ResponseTimeMessageInInterceptor() {
-        super(Phase.RECEIVE);
+        super(Phase.POST_LOGICAL);
     }
     
     public void handleMessage(Message message) throws Fault {



Mime
View raw message