You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/06/07 12:52:10 UTC
svn commit: r664316 [1/2] - in /incubator/tuscany/java/sca: itest/
itest/late-reference-resolution/ itest/late-reference-resolution/src/
itest/late-reference-resolution/src/main/
itest/late-reference-resolution/src/main/java/ itest/late-reference-resol...
Author: slaws
Date: Sat Jun 7 03:52:09 2008
New Revision: 664316
URL: http://svn.apache.org/viewvc?rev=664316&view=rev
Log:
Rename EndpointProvider to EndpointResolver and create a new extension point for endpoint resolvers. Create an itest for endpoint resolution.
Added:
incubator/tuscany/java/sca/itest/late-reference-resolution/ (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java (with props)
incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java (with props)
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java (with props)
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java (with props)
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/EndpointResolver.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/EndpointResolverFactory.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/EndpointResolverFactoryExtensionPoint.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactoryExtensionPoint
incubator/tuscany/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointResolverFactoryImpl.java (with props)
incubator/tuscany/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointResolverImpl.java (with props)
incubator/tuscany/java/sca/modules/endpoint/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/java/org/apache/tuscany/sca/runtime/tomcat/EndpointResolverFactoryImpl.java (with props)
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/java/org/apache/tuscany/sca/runtime/tomcat/EndpointResolverImpl.java (with props)
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
Removed:
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestEndpointProviderFactoryImpl.java
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestEndpointProviderImpl.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/EndpointProvider.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/EndpointProviderFactory.java
incubator/tuscany/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointProviderFactoryImpl.java
incubator/tuscany/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointProviderImpl.java
incubator/tuscany/java/sca/modules/endpoint/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.EndpointProviderFactory
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/java/org/apache/tuscany/sca/runtime/tomcat/EndpointProviderFactoryImpl.java
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/java/org/apache/tuscany/sca/runtime/tomcat/EndpointProviderImpl.java
incubator/tuscany/java/sca/modules/runtime-tomcat/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.EndpointProviderFactory
Modified:
incubator/tuscany/java/sca/itest/pom.xml
incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/EndpointWireImpl.java
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeComponentReferenceImpl.java
incubator/tuscany/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jun 7 03:52:09 2008
@@ -0,0 +1,5 @@
+.classpath
+.project
+.settings
+target
+work
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml Sat Jun 7 03:52:09 2008
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-late-reference-resolution</artifactId>
+ <name>Apache Tuscany SCA Late Reference Resolution Integration Test</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node2-api</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node2-launcher</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-manager</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-node-runtime</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-axis2</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-http</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-resource</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+</project>
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The Add service interface
+ */
+@Remotable
+public interface AddService {
+
+ double add(double n1, double n2);
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+ public double add(double n1, double n2) {
+ System.out.println("AddService - add " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+
+/**
+ * The Calculator service interface.
+ */
+public interface CalculatorService {
+
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Reference;
+
+
+/**
+ * An implementation of the Calculator service.
+ */
+public class CalculatorServiceImpl implements CalculatorService {
+
+ private AddService addService;
+ private SubtractService subtractService;
+ private MultiplyService multiplyService;
+ private DivideService divideService;
+
+ @Reference
+ public void setAddService(AddService addService) {
+ this.addService = addService;
+ }
+
+ @Reference
+ public void setSubtractService(SubtractService subtractService) {
+ this.subtractService = subtractService;
+ }
+
+ @Reference
+ public void setMultiplyService(MultiplyService multiplyService) {
+ this.multiplyService = multiplyService;
+ }
+
+ @Reference
+ public void setDivideService(DivideService divideService) {
+ this.divideService = divideService;
+ }
+
+ public double add(double n1, double n2) {
+ System.out.println("CalculatorService - add " + n1 + " and " + n2);
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ System.out.println("CalculatorService - subtract " + n1 + " and " + n2);
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ System.out.println("CalculatorService - multiply " + n1 + " and " + n2);
+ return multiplyService.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ System.out.println("CalculatorService - divide " + n1 + " and " + n2);
+ return divideService.divide(n1, n2);
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+ double divide(double n1, double n2);
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+ public double divide(double n1, double n2) {
+ return n1 / n2;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface MultiplyService {
+
+ double multiply(double n1, double n2);
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Multiply service.
+ */
+public class MultiplyServiceImpl implements MultiplyService {
+
+ public double multiply(double n1, double n2) {
+ return n1 * n2;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for the multiply service
+ */
+@Remotable
+public interface SubtractService {
+
+ double subtract(double n1, double n2);
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the subtract service.
+ */
+public class SubtractServiceImpl implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ System.out.println("SubtractService - subtract " + n1 + " and " + n2);
+ return n1 - n2;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory Sat Jun 7 03:52:09 2008
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the binding extension
+binding.sca.BindingScaEndpointResolverFactoryImpl;model=org.apache.tuscany.sca.assembly.SCABinding
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite Sat Jun 7 03:52:09 2008
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="CalculatorA">
+
+ <component name="CalculatorServiceComponentA">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponentB" />
+ <reference name="subtractService" target="SubtractServiceComponentC" />
+ <reference name="multiplyService" target="MultiplyServiceComponentA"/>
+ <reference name="divideService" target="DivideServiceComponentA" />
+ </component>
+
+ <component name="MultiplyServiceComponentA">
+ <implementation.java class="calculator.MultiplyServiceImpl" />
+ </component>
+
+ <component name="DivideServiceComponentA">
+ <implementation.java class="calculator.DivideServiceImpl" />
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml Sat Jun 7 03:52:09 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:CalculatorA"/>
+</contribution>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite Sat Jun 7 03:52:09 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="CalculatorB">
+
+ <component name="AddServiceComponentB">
+ <implementation.java class="calculator.AddServiceImpl" />
+ <service name="AddService">
+ <binding.sca uri="http://localhost:8085/AddServiceComponentB"/>
+ </service>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml Sat Jun 7 03:52:09 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:CalculatorB"/>
+</contribution>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite Sat Jun 7 03:52:09 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="CalculatorC">
+
+ <component name="SubtractServiceComponentC">
+ <implementation.java class="calculator.SubtractServiceImpl" />
+ <service name="SubtractService">
+ <binding.sca uri="http://localhost:8086/SubtractServiceComponentC"/>
+ </service>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml Sat Jun 7 03:52:09 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:CalculatorC"/>
+</contribution>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package binding.sca;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolver;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory;
+
+/**
+ * The factory for creating endpoint Binding providers
+ *
+ * @version $Rev$ $Date$
+ */
+public class BindingScaEndpointResolverFactoryImpl implements EndpointResolverFactory<SCABinding> {
+
+ private ExtensionPointRegistry extensionPoints;
+
+ public BindingScaEndpointResolverFactoryImpl(ExtensionPointRegistry extensionPoints) {
+ this.extensionPoints = extensionPoints;
+ }
+
+ public EndpointResolver createEndpointResolver(Endpoint endpoint, Binding binding) {
+
+ return new BindingScaEndpointResolverImpl(extensionPoints, endpoint, binding);
+ }
+
+ public Class<SCABinding> getModelType() {
+ return SCABinding.class;
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package binding.sca;
+
+
+import java.util.logging.Logger;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolver;
+
+import calculator.LateReferenceResolutionTestCase;
+
+/**
+ * The endpoint resolver allows unresolved endpoints to be plumbed into
+ * the runtime start and message send processing as a hook to late resolution
+ * of target services
+ *
+ * @version $Rev$ $Date$
+ */
+public class BindingScaEndpointResolverImpl implements EndpointResolver {
+
+ private final static Logger logger = Logger.getLogger(BindingScaEndpointResolverImpl.class.getName());
+
+ private Endpoint endpoint;
+ private SCABinding binding;
+
+ public BindingScaEndpointResolverImpl(ExtensionPointRegistry extensionPoints,
+ Endpoint endpoint,
+ Binding binding) {
+ this.endpoint = endpoint;
+ this.binding = (SCABinding)binding;
+ }
+
+ public void start(){
+ // do nothing
+ }
+
+ public void resolve() {
+ if (endpoint.isUnresolved()){
+ // I can cheat here because I know this test only has
+ // SCA Bindings in it so all I have to do it find the URL
+ // of the endpoint
+ String targetURL = LateReferenceResolutionTestCase.registry.locateService(endpoint.getTargetName());
+ binding.setURI(targetURL);
+ endpoint.setSourceBinding(binding);
+ }
+ }
+
+ public void stop(){
+ // do nothing
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Runs a distributed domain in a single VM by using and in memory
+ * implementation of the distributed domain
+ */
+public class LateReferenceResolutionTestCase {
+
+ private static SCANode2 nodeA;
+ private static SCANode2 nodeB;
+ private static SCANode2 nodeC;
+
+ private static CalculatorService calculatorService;
+
+ public static TestRegistryImpl registry = new TestRegistryImpl();
+
+ @BeforeClass
+ public static void init() throws Exception {
+
+ try {
+ System.out.println("Setting up domain");
+
+
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ nodeC = nodeFactory.createSCANode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
+ new SCAContribution("NodeC",
+ new File("src/main/resources/nodeC").toURL().toString()));
+ nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
+ new SCAContribution("NodeB",
+ new File("src/main/resources/nodeB").toURL().toString()));
+ nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
+ new SCAContribution("NodeA",
+ new File("src/main/resources/nodeA").toURL().toString()));
+
+ nodeC.start();
+ nodeB.start();
+ nodeA.start();
+
+ SCAClient client = (SCAClient)nodeA;
+ calculatorService =
+ client.getService(CalculatorService.class, "CalculatorServiceComponentA");
+
+ } catch(Exception ex){
+ System.err.println(ex.toString());
+ }
+
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeC.stop();
+ nodeB.stop();
+ nodeA.stop();
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ // Calculate
+ Assert.assertEquals(calculatorService.add(3, 2), 5.0);
+ Assert.assertEquals(calculatorService.subtract(3, 2), 1.0);
+ Assert.assertEquals(calculatorService.multiply(3, 2), 6.0);
+ Assert.assertEquals(calculatorService.divide(3, 2), 1.5);
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java (added)
+++ incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * A dummy domain registry component
+ */
+public class TestRegistryImpl {
+
+ public String locateService(String targetServiceName){
+ String targetURL = null;
+
+ // In reality of course a registry would have to be initialized
+ // with the real target service endpoints but in this test
+ // we know what they are going to be ahead of time
+ if (targetServiceName.equals("AddServiceComponentB")){
+ targetURL = "http://localhost:8085/" + targetServiceName;
+ } else if (targetServiceName.equals("SubtractServiceComponentC")){
+ targetURL = "http://localhost:8086/" + targetServiceName;
+ }
+
+ return targetURL;
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/itest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/pom.xml?rev=664316&r1=664315&r2=664316&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/pom.xml (original)
+++ incubator/tuscany/java/sca/itest/pom.xml Sat Jun 7 03:52:09 2008
@@ -91,11 +91,13 @@
-->
<module>jms</module>
<module>large-sdo-ws</module>
+ <module>late-reference-resolution</module>
<module>oneway</module>
<module>operation-overloading</module>
<module>osgi-implementation</module>
<module>osgi-contribution</module>
<module>policy</module>
+ <!--module>policy-authorization</module-->
<module>policy-security</module>
<module>properties</module>
<module>recursive</module>
Added: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java (added)
+++ incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolver;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory;
+
+/**
+ * The factory for creating endpoint Binding providers
+ *
+ * @version $Rev$ $Date$
+ */
+public class BindingScaEndpointResolverFactoryImpl implements EndpointResolverFactory<SCABinding> {
+
+ private ExtensionPointRegistry extensionPoints;
+
+ public BindingScaEndpointResolverFactoryImpl(ExtensionPointRegistry extensionPoints) {
+ this.extensionPoints = extensionPoints;
+ }
+
+ public EndpointResolver createEndpointResolver(Endpoint endpoint, Binding binding) {
+
+ return new BindingScaEndpointResolverImpl(extensionPoints, endpoint, binding);
+ }
+
+ public Class<SCABinding> getModelType() {
+ return SCABinding.class;
+ }
+}
Propchange: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverFactoryImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java (added)
+++ incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java Sat Jun 7 03:52:09 2008
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+
+import java.util.logging.Logger;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.endpointresolver.EndpointResolver;
+
+/**
+ * The endpoint resolver allows unresolved endpoints to be plumbed into
+ * the runtime start and message send processing as a hook to late resolution
+ * of target services
+ *
+ * @version $Rev$ $Date$
+ */
+public class BindingScaEndpointResolverImpl implements EndpointResolver {
+
+ private final static Logger logger = Logger.getLogger(BindingScaEndpointResolverImpl.class.getName());
+
+ private Endpoint endpoint;
+ private SCABinding binding;
+
+ public BindingScaEndpointResolverImpl(ExtensionPointRegistry extensionPoints,
+ Endpoint endpoint,
+ Binding binding) {
+ this.endpoint = endpoint;
+ this.binding = (SCABinding)binding;
+ }
+
+ public void start(){
+ // do nothing
+ }
+
+ public void resolve() {
+ if (endpoint.isUnresolved()){
+ // pretend to resolve the endpoint. In this test case to what we know
+ // it should be
+ logger.info("Fixing up endpoint soure binding");
+ endpoint.setSourceBinding(endpoint.getCandidateBindings().get(0));
+ endpoint.getSourceBinding().setURI("http://localhost:8085/BHelloWorldServiceRemote");
+ }
+ }
+
+ public void stop(){
+ // do nothing
+ }
+}
Propchange: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BindingScaEndpointResolverImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java?rev=664316&r1=664315&r2=664316&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java (original)
+++ incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java Sat Jun 7 03:52:09 2008
@@ -29,7 +29,6 @@
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeService;
-import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
@@ -41,8 +40,6 @@
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
import org.apache.tuscany.sca.node.NodeException;
-import org.apache.tuscany.sca.provider.EndpointProviderFactory;
-import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -87,14 +84,7 @@
nodeRuntime.getCompositeActivator().setDomainComposite(nodeComposite);
// add a contribution to the domain
- ContributionService contributionService = nodeRuntime.getContributionService();
-
- // fix up the endpoint provider for testing purposes
- logger.info("Fixing up endpoint provider factory");
- ProviderFactoryExtensionPoint providerFactories = nodeRuntime.getExtensionPointRegistry().getExtensionPoint(ProviderFactoryExtensionPoint.class);
- EndpointProviderFactory providerFactory =(EndpointProviderFactory)providerFactories.getProviderFactory(Endpoint.class);
- providerFactories.removeProviderFactory(providerFactory);
- providerFactories.addProviderFactory(new TestEndpointProviderFactoryImpl(nodeRuntime.getExtensionPointRegistry()));
+ ContributionService contributionService = nodeRuntime.getContributionService();
// find the current directory as a URL. This is where our contribution
// will come from
Added: incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory?rev=664316&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory (added)
+++ incubator/tuscany/java/sca/modules/binding-sca-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory Sat Jun 7 03:52:09 2008
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the binding extension
+org.apache.tuscany.sca.binding.sca.axis2.BindingScaEndpointResolverFactoryImpl;model=org.apache.tuscany.sca.assembly.SCABinding