cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r561680 - /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
Date Wed, 01 Aug 2007 07:00:48 GMT
Author: jliu
Date: Wed Aug  1 00:00:47 2007
New Revision: 561680

URL: http://svn.apache.org/viewvc?view=rev&rev=561680
Log:
Move the invocation of actually object to a separate method, this makes it easier to override
the invocation while still be able to reuse other functionalities in AbstractInvoker and JAXWSMethodInvoker.
Below is the comment from Bharath: "In a J2EE container model, when the Endpoint has no SEI(no
interface), the container would like to give some crude object, which might be like an InvocationHandler,
this crude object's invoke method would have the logic to the actual invocation on the POJO.
So this Object would not contain the actual which CXF is supposed to invoke, instead it would
act like a dispatcher, which would have an invoke() method, which internally takes care of
maintaining the POJO Instance and performing the invocation"

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?view=diff&rev=561680&r1=561679&r2=561680
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
Wed Aug  1 00:00:47 2007
@@ -70,9 +70,8 @@
                 paramArray = params.toArray();
             }
             
-            paramArray = insertExchange(m, paramArray, exchange);
+            res = performInvocation(exchange, serviceObject, m, paramArray);
             
-            res = m.invoke(serviceObject, paramArray);
             if (exchange.isOneWay()) {
                 return null;
             }
@@ -92,6 +91,12 @@
             exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
             throw new Fault(e);
         }
+    }
+    
+    protected Object performInvocation(Exchange exchange, final Object serviceObject, Method
m,
+                                       Object[] paramArray) throws Exception {
+        paramArray = insertExchange(m, paramArray, exchange);
+        return m.invoke(serviceObject, paramArray);
     }
 
     public Object[] insertExchange(Method method, Object[] params, Exchange context) {



Mime
View raw message