Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 35691 invoked from network); 1 Aug 2007 07:01:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Aug 2007 07:01:10 -0000 Received: (qmail 12648 invoked by uid 500); 1 Aug 2007 07:01:09 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 12596 invoked by uid 500); 1 Aug 2007 07:01:09 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 12578 invoked by uid 99); 1 Aug 2007 07:01:09 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2007 00:01:09 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2007 07:01:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5ACCD1A981A; Wed, 1 Aug 2007 00:00:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cxf-commits@incubator.apache.org From: jliu@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070801070048.5ACCD1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {