summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-rmi-runtime/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-12 23:43:27 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-12 23:43:27 +0000
commitc122a7379b57d45d2c994728171d20609842f7c5 (patch)
tree9ea10773724f65216b0ebe8d155db4dabaca08f9 /java/sca/modules/binding-rmi-runtime/src
parentaaa85d1773cf5740e22913a9b5027f0bfebbf1de (diff)
Fix issues around XMLStreamWriter based on the isRepairingNamespaces property of XMLOutputFactory
More refactoring to use common-xml and common-java git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803742 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-rmi-runtime/src')
-rw-r--r--java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
index 506c2385fb..c572b4e19b 100644
--- a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
+++ b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
@@ -34,6 +34,7 @@ import net.sf.cglib.proxy.MethodProxy;
import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.common.java.classloader.ClassLoaderDelegate;
import org.apache.tuscany.sca.host.rmi.RMIHost;
import org.apache.tuscany.sca.host.rmi.RMIHostException;
import org.apache.tuscany.sca.interfacedef.Interface;
@@ -140,33 +141,11 @@ public class RMIServiceBindingProvider implements ServiceBindingProvider {
/*
* In OSGi, the classloader for the interface cannot access the classes for the CGLIB
*/
- enhancer.setClassLoader(new MixedClassLoader(targetJavaInterface.getClassLoader(), getClass().getClassLoader()));
+ enhancer.setClassLoader(new ClassLoaderDelegate(targetJavaInterface.getClassLoader(), getClass().getClassLoader()));
enhancer.setInterfaces(new Class[] {targetJavaInterface});
return (Remote)enhancer.create();
}
- private static class MixedClassLoader extends ClassLoader {
- private ClassLoader runtime;
-
- public MixedClassLoader(ClassLoader parent, ClassLoader runtime) {
- super(parent);
- this.runtime = runtime;
- }
-
- @Override
- protected Class<?> findClass(String name) throws ClassNotFoundException {
- try {
- return super.findClass(name);
- } catch (ClassNotFoundException e) {
- if (runtime != null && runtime != getParent()) {
- return runtime.loadClass(name);
- } else {
- throw e;
- }
- }
- }
- }
-
private Object invokeTarget(Operation op, Object[] args) throws InvocationTargetException {
return wire.invoke(op, args);
}