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<Object> 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);
}
}