From 319187c87be09000e7b849045395be967aa5999b Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 26 Sep 2011 09:01:06 +0000 Subject: [PATCH] Add missing doPrivileged block. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1175724 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/invocation/JavaImplementationInvoker.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index 33008c2e25..4ce1fdcf4b 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -136,7 +136,13 @@ public class JavaImplementationInvoker implements Invoker, DataExchangeSemantics // set it so that the thread context classloader of the thread used to invoke an operation // of a Java POJO component implementation is the class loader of the contribution // used to load the POJO implementation class. - contributionClassloader = instance.getClass().getClassLoader(); + contributionClassloader = AccessController.doPrivileged(new PrivilegedAction() { + public ClassLoader run() { + ClassLoader contributionClassloader = instance.getClass().getClassLoader(); + return contributionClassloader; + } + }); + if (tccl != contributionClassloader){ AccessController.doPrivileged(new PrivilegedAction() { public Object run() {