summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java8
1 files changed, 7 insertions, 1 deletions
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<ClassLoader>() {
+ public ClassLoader run() {
+ ClassLoader contributionClassloader = instance.getClass().getClassLoader();
+ return contributionClassloader;
+ }
+ });
+
if (tccl != contributionClassloader){
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {