From 8ca8c4e81fae5fd2dae35084f97bf5eac6fadd57 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 13 Jan 2010 01:01:47 +0000 Subject: Enable the remotable setting on OSGi interfaces git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@898591 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/osgi/remoteserviceadmin/impl/EndpointIntrospector.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org') diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointIntrospector.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointIntrospector.java index 916761f129..0080e69540 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointIntrospector.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointIntrospector.java @@ -424,9 +424,11 @@ public class EndpointIntrospector { throws ClassNotFoundException, InvalidInterfaceException { JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); Class interfaceClass = bundle.loadClass(intf); - JavaInterface javaInterface = javaInterfaceFactory.createJavaInterface(interfaceClass); - // [rfeng] For OSGi, the interfaces should be marked as remote + JavaInterface javaInterface = javaInterfaceFactory.createJavaInterface(); + // [rfeng] For OSGi, the interfaces should be marked as remotable javaInterface.setRemotable(true); + // [rfeng] We need to mark the interface to be remotable before the createJavaInterface() is called + javaInterfaceFactory.createJavaInterface(javaInterface, interfaceClass); interfaceContract.setInterface(javaInterface); if (javaInterface.getCallbackClass() != null) { JavaInterface callbackInterface = javaInterfaceFactory.createJavaInterface(javaInterface.getCallbackClass()); -- cgit v1.2.3