binding = reference.getBindings().get(0);
}
}
Interface i = reference.getInterfaceContract().getInterface();
if (i instanceof JavaInterface) {
JavaInterface javaInterface = (JavaInterface)i;
if (javaInterface.isUnresolved()) {
// Allow privileged access to get ClassLoader. Requires RuntimePermission in
// security policy.
ClassLoader classLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
});
javaInterface.setJavaClass(classLoader.loadClass(javaInterface.getName()));
compositeActivator.getCompositeContext().getJavaInterfaceFactory()
.createJavaInterface(javaInterface, javaInterface.getJavaClass());
//FIXME: If the interface needs XSDs to be loaded (e.g., for static SDO),
// this needs to be done here. We usually search for XSDs in the current
// contribution at resolve time. Is it possible to locate the current
// contribution at runtime?
}
this.businessInterface = (Class<B>)javaInterface.getJavaClass();
}
if (binding instanceof BindingBuilderExtension) {
((BindingBuilderExtension)binding).getBuilder().build(component, reference, binding, null);
}
this.proxyFactory = compositeActivator.getCompositeContext().getProxyFactory();