From dcbff0df93448ef786c2e5cb0320f3895759171b Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 19 Mar 2009 16:12:22 +0000 Subject: Switch over to new endpoint reference/endpoint model. These are the changes required to exploit the model in the runtime up to the point were the old EndpointReference is retrieved from a wire. The next step is to convert this over too and exploit the new endpoint references fully. There is still tidying to do (search for TODO - EPR) in particular I haven't removed any of the old files yet. So beware don't put changes into CompositeActivator or RuntimeWire as the runtime isn't using them git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756070 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'java/sca/modules/node-impl') diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 1f9e085590..f841f96e75 100644 --- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -124,6 +124,7 @@ public class NodeImpl implements Node, Client { private XMLInputFactory inputFactory; private ContributionBuilder contributionDependencyBuilder; private CompositeBuilder compositeBuilder; + private CompositeBuilder endpointReferenceBuilder; private StAXArtifactProcessorExtensionPoint xmlProcessors; private StAXArtifactProcessor compositeProcessor; private ProxyFactory proxyFactory; @@ -358,6 +359,10 @@ public class NodeImpl implements Node, Client { CompositeBuilderExtensionPoint compositeBuilders = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class); compositeBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); + // Get endpoint builders + // TODO - new extension point? + endpointReferenceBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.endpoint.impl.EndpointReferenceBuilderImpl"); + // Initialize runtime // Get proxy factory @@ -549,6 +554,10 @@ public class NodeImpl implements Node, Client { compositeBuilder.build(composite, systemDefinitions, monitor); analyzeProblems(); + // build the endpoint references + endpointReferenceBuilder.build(composite, systemDefinitions, monitor); + analyzeProblems(); + // Create a top level composite to host our composite // This is temporary to make the activator happy Composite tempComposite = assemblyFactory.createComposite(); @@ -673,9 +682,10 @@ public class NodeImpl implements Node, Client { if (serviceName == null || serviceName.equals(componentService.getName())) { CompositeService compositeService = (CompositeService)componentService.getService(); if (compositeService != null) { - if (serviceName != null) { - serviceName = "$promoted$" + component.getName() + "$slash$" + serviceName; - } + // TODO - EPR - $promoted$ no longer used + //if (serviceName != null) { + // serviceName = "$promoted$" + component.getName() + "$slash$" + serviceName; + //} componentContext = ((RuntimeComponent)compositeService.getPromotedComponent()).getComponentContext(); return componentContext.createSelfReference(businessInterface, compositeService -- cgit v1.2.3