From 834b5bdc502ce8bf1c04c203feae6891dc60d118 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 6 Jun 2011 10:57:28 +0000 Subject: Add the sca-api to the class loader heirachy so that the annotations get correctly picked up in contributions git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132590 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sca-java-2.x/trunk/modules/domain-node/src') diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java index fc46018904..8eba36d639 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java @@ -24,8 +24,6 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.List; -import javax.xml.bind.JAXBElement; - import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.ComponentReference; @@ -46,13 +44,14 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.ContributionDescription; +import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.NoSuchServiceException; import org.oasisopen.sca.ServiceRuntimeException; +import org.oasisopen.sca.annotation.Remotable; /** * All the code for creating a service proxy in this helper class as it feels like @@ -185,7 +184,6 @@ public class ServiceHelper { interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); JavaInterface callInterface = javaInterfaceFactory.createJavaInterface(businessInterface); callInterface.setRemotable(true); - callInterface.resetDataBinding(JAXBElement.class.getName()); interfaceContract.setInterface(callInterface); if (callInterface.getCallbackClass() != null) { interfaceContract.setCallbackInterface(javaInterfaceFactory.createJavaInterface(callInterface @@ -202,7 +200,7 @@ public class ServiceHelper { String curi = domainRegistry.getContainingCompositesContributionURI(endpoint.getComponent().getName()); if (curi != null) { ContributionDescription ic = domainRegistry.getInstalledContribution(curi); - ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}); + ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}, Remotable.class.getClassLoader()); return cl.loadClass(((JavaInterface)iface).getName()); } } -- cgit v1.2.3