Add missing doPrivileged block.

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1175724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
slaws 2011-09-26 09:01:06 +00:00
parent 4e582f32e4
commit 319187c87b

View file

@ -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() {