diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:08:20 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:08:20 +0000 |
commit | 61c9466ff91ca40f4b1ebbe670d7848e521131d7 (patch) | |
tree | d41cd727b04a6146533cc3ad97182e715cd61e32 /branches/sca-java-1.3.3/itest/late-reference-resolution | |
parent | 0cc8ed2208c9d04057bcb00859490290e3aa948c (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835130 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3.3/itest/late-reference-resolution')
22 files changed, 0 insertions, 930 deletions
diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/pom.xml b/branches/sca-java-1.3.3/itest/late-reference-resolution/pom.xml deleted file mode 100644 index c5c9f684e7..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ -<?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>1.3.3-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>1.3.3-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node2-launcher</artifactId> - <version>1.3.3-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-domain-manager</artifactId> - <version>1.3.3-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.3.3-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca</artifactId> - <version>1.3.3-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-axis2</artifactId> - <version>1.3.3-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.3.3-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-endpoint</artifactId> - <version>1.3.3-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.3.3-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>1.3.3-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> diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddService.java deleted file mode 100644 index d7dc4473ad..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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); - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9b7e254e5..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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; - } - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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); - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index da869e00fd..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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); - } - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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); - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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; - } - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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); - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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; - } - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 78ab9c6ee0..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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); - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1010207154..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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; - } - -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory deleted file mode 100644 index c53b55aacf..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/META-INF/services/org.apache.tuscany.sca.endpointresolver.EndpointResolverFactory +++ /dev/null @@ -1,19 +0,0 @@ -# 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
diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite deleted file mode 100644 index 378d6e9706..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/Calculator.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?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> diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml deleted file mode 100644 index db255e0232..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeA/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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 diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite deleted file mode 100644 index 3fb16fa619..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/Calculator.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?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> diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml deleted file mode 100644 index 130157ac04..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeB/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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 diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite deleted file mode 100644 index c615b4355a..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/Calculator.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?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> diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml deleted file mode 100644 index cba0a5c281..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/main/resources/nodeC/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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 diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java deleted file mode 100644 index e4bd3035e2..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverFactoryImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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; - } -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java deleted file mode 100644 index c6e0689837..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/binding/sca/BindingScaEndpointResolverImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 - } -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java deleted file mode 100644 index d3fe027e60..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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.SCAContribution; -import org.apache.tuscany.sca.node.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -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); - } -} diff --git a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java b/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java deleted file mode 100644 index 57afc9ea50..0000000000 --- a/branches/sca-java-1.3.3/itest/late-reference-resolution/src/test/java/calculator/TestRegistryImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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; - } -} |