Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CD48473B for ; Mon, 9 May 2011 09:13:21 +0000 (UTC) Received: (qmail 71884 invoked by uid 500); 9 May 2011 09:13:21 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 71838 invoked by uid 500); 9 May 2011 09:13:21 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 71831 invoked by uid 99); 9 May 2011 09:13:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 09:13:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 09:13:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AD569238897F; Mon, 9 May 2011 09:12:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1100925 - in /cxf/branches/2.3.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java Date: Mon, 09 May 2011 09:12:59 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110509091259.AD569238897F@eris.apache.org> Author: ffang Date: Mon May 9 09:12:55 2011 New Revision: 1100925 URL: http://svn.apache.org/viewvc?rev=1100925&view=rev Log: Merged revisions 1100921 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1100921 | ffang | 2011-05-09 16:54:00 +0800 (δΈ€, 09 5 2011) | 1 line [CXF-3503]CXF should set the TCCL to the one of the service being invoked prior any invocation ........ Modified: cxf/branches/2.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?rev=1100925&r1=1100924&r2=1100925&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java (original) +++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java Mon May 9 09:12:55 2011 @@ -80,7 +80,9 @@ public abstract class AbstractInvoker im protected Object invoke(Exchange exchange, final Object serviceObject, Method m, List params) { Object res; + ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); try { + Thread.currentThread().setContextClassLoader(serviceObject.getClass().getClassLoader()); Object[] paramArray = new Object[]{}; if (params != null) { paramArray = params.toArray(); @@ -131,6 +133,8 @@ public abstract class AbstractInvoker im checkSuspendedInvocation(exchange, serviceObject, m, params, e); exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT); throw createFault(e, m, params, false); + } finally { + Thread.currentThread().setContextClassLoader(oldCL); } }