diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-06 10:57:28 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-06 10:57:28 +0000 |
commit | 834b5bdc502ce8bf1c04c203feae6891dc60d118 (patch) | |
tree | ea19efae2444a78c03d3e7b2ca71ec5d95b65735 /sca-java-2.x/trunk/modules | |
parent | 835a2194bfbd177374e79fa43825d01eb537822f (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/ServiceHelper.java | 8 |
1 files changed, 3 insertions, 5 deletions
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());
}
}
|