diff options
Diffstat (limited to '')
214 files changed, 0 insertions, 11286 deletions
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/build-jar.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/build-jar.xml deleted file mode 100644 index 299ce6864f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/build-jar.xml +++ /dev/null @@ -1,39 +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 name="JarCreator"> - - <target name="create-jar"> - - <mkdir dir="${jar.dir}"/> - - <copy file="target/classes/META-INF/${sca.contribution}" tofile="target/classes/META-INF/sca-contribution.xml"/> - - - <jar jarfile="${jar.dir}/${jar.file.name}" > - <fileset dir="${files.dir}" includes="${files.list}"> - <!-- include name="${files.list}"/--> - </fileset> - </jar> - - <delete file="target/classes/META-INF/sca-contribution.xml"/> - </target> - - -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/pom.xml deleted file mode 100644 index ca54eca210..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/pom.xml +++ /dev/null @@ -1,203 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-classloader-classes</artifactId> - <name>Apache Tuscany Contribution ClassLoader Test : Contribution Classes</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>itest-contribution-classloader-classes</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.1</version> - - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>create-jar</id> - <phase>generate-test-sources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="SupplyChain.jar" /> - <property name="sca.contribution" value="supplychain-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/supplychain.composite \ - supplychain/warehouse/JavaWarehouseComponentImpl.componentType \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="CompleteSupplyChain.jar" /> - <property name="sca.contribution" value="complete-supplychain-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/supplychain.composite \ - supplychain/customer/* \ - supplychain/retailer/* \ - supplychain/warehouse/* \ - supplychain/shipper/* \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="Customer.jar" /> - <property name="sca.contribution" value="customer-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/customer/* \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="Retailer.jar" /> - <property name="sca.contribution" value="retailer-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/retailer/* \ - META-INF/sca-contribution.xml" /> - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="Shipper.jar" /> - <property name="sca.contribution" value="shipper-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/shipper/* \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="Warehouse.jar" /> - <property name="sca.contribution" value="warehouse-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/warehouse/* \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="IllegalSupplyChain1.jar" /> - <property name="sca.contribution" value="illegal1-supplychain-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/illegalsupplychain.composite \ - supplychain/warehouse/JavaWarehouseComponentImpl.componentType \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="IllegalSupplyChain2.jar" /> - <property name="sca.contribution" value="illegal2-supplychain-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/illegalsupplychain.composite \ - supplychain/warehouse/JavaWarehouseComponentImpl.componentType \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="IllegalCustomer.jar" /> - <property name="sca.contribution" value="illegal-customer-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/customer/* \ - supplychain/illegal/* \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="CustomerInterface.jar" /> - <property name="sca.contribution" value="customer-interface-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/customer/Customer.class \ - META-INF/sca-contribution.xml" /> - - </ant> - <ant antfile="./build-jar.xml" target="create-jar"> - <property name="jar.dir" value="target/classes" /> - <property name="files.dir" value="target/classes" /> - <property name="jar.file.name" value="CustomerImpl.jar" /> - <property name="sca.contribution" value="customer-impl-sca-contribution.xml" /> - <property name="files.list" - value="supplychain/customer/JavaCustomerComponentImpl.class \ - META-INF/sca-contribution.xml" /> - - </ant> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/Customer.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/Customer.java deleted file mode 100644 index 814c38777a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/Customer.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 supplychain.customer; - -import org.osoa.sca.annotations.OneWay; - -/** - * This is the business interface of the Customer service component. - */ -public interface Customer { - - public void purchaseGoods(); - - @OneWay - public void notifyShipment(String order); - - public int outstandingOrderCount(); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java deleted file mode 100644 index e4daf0ec02..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java +++ /dev/null @@ -1,63 +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 supplychain.customer; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.retailer.Retailer; - -/** - * This class implements the Customer service component (POJO implementation). - */ -@Service(Customer.class) -@Scope("COMPOSITE") -public class JavaCustomerComponentImpl implements Customer { - - private static int outstandingOrderCount; - - private Retailer retailer; - - public JavaCustomerComponentImpl() { - System.out.println("Created " + this.getClass().getName() + - " using: " + this.getClass().getClassLoader()); - } - - @Reference - public void setRetailer(Retailer retailer) { - this.retailer = retailer; - } - - public void purchaseGoods() { - outstandingOrderCount++; - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - outstandingOrderCount--; - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - - public int outstandingOrderCount() { - return outstandingOrderCount; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/illegal/JavaCustomerComponentImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/illegal/JavaCustomerComponentImpl.java deleted file mode 100644 index e4b3bc7048..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/illegal/JavaCustomerComponentImpl.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 supplychain.illegal; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.customer.Customer; -import supplychain.retailer.JavaRetailerComponentImpl; -import supplychain.retailer.Retailer; -import supplychain.warehouse.JavaWarehouseComponentImpl; -import supplychain.warehouse.Warehouse; - -/** - * This class implements the Customer service component (POJO implementation). - */ -@Service(Customer.class) -@Scope("COMPOSITE") -public class JavaCustomerComponentImpl implements Customer { - - private static int outstandingOrderCount; - - private Retailer retailer; - - public JavaCustomerComponentImpl() { - System.out.println("Created " + this.getClass().getName() + - " using: " + this.getClass().getClassLoader()); - } - - @Reference - public void setRetailer(Retailer retailer) { - this.retailer = retailer; - } - - public void purchaseGoods() { - - Retailer retailerImpl = new JavaRetailerComponentImpl(); - System.out.println("Created a retailer from Customer " + retailerImpl); - - Warehouse warehouseImpl = new JavaWarehouseComponentImpl(); - System.out.println("Created a warehouse from Customer " + warehouseImpl); - - outstandingOrderCount++; - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - outstandingOrderCount--; - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - - public int outstandingOrderCount() { - return outstandingOrderCount; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java deleted file mode 100644 index 698aa2aa5d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java +++ /dev/null @@ -1,61 +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 supplychain.retailer; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.warehouse.Warehouse; - -/** - * This class implements the Retailer service component (POJO implementation). - */ -@Service(Retailer.class) -@Scope("STATELESS") -public class JavaRetailerComponentImpl implements Retailer { - - private Warehouse warehouse; - - public JavaRetailerComponentImpl() { - System.out.println("Created " + this.getClass().getName() + - " using: " + this.getClass().getClassLoader()); - } - - @Reference - public void setWarehouse(Warehouse warehouse) { - this.warehouse = warehouse; - } - - - public Warehouse getWarehouse() { - return warehouse; - } - - public void submitOrder(String order) { - - warehouse.fulfillOrder(order + ", submitted"); - - } - - - - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/Retailer.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/Retailer.java deleted file mode 100644 index 1e87d59af1..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/retailer/Retailer.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 supplychain.retailer; - -/** - * This is the business interface of the Retailer service component. - */ -public interface Retailer { - - public void submitOrder(String order); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java deleted file mode 100644 index 9e01f00a79..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java +++ /dev/null @@ -1,52 +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 supplychain.shipper; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.customer.Customer; - -/** - * This class implements the Shipper service component (POJO implementation). - */ -@Service(Shipper.class) -@Scope("COMPOSITE") -public class JavaShipperComponentImpl implements Shipper { - - private Customer customer; - - public JavaShipperComponentImpl() { - System.out.println("Created " + this.getClass().getCanonicalName() + - " using: " + this.getClass().getClassLoader()); - } - - @Reference - public void setCustomer(Customer customer) { - this.customer = customer; - } - - public void processShipment(String order) { - customer.notifyShipment(order + ", shipped"); - } - - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/Shipper.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/Shipper.java deleted file mode 100644 index 2514928c10..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/shipper/Shipper.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 supplychain.shipper; - -/** - * This is the business interface of the Shipper service component. - */ -public interface Shipper { - - public void processShipment(String order); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java deleted file mode 100644 index cdd12d589d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java +++ /dev/null @@ -1,47 +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 supplychain.warehouse; - -import org.osoa.sca.annotations.Scope; - -import supplychain.shipper.Shipper; - -/** - * This class implements the Warehouse service component (POJO implementation). - */ -@Scope("STATELESS") -public class JavaWarehouseComponentImpl implements Warehouse { - - private Shipper shipper; - - public JavaWarehouseComponentImpl() { - System.out.println("Created " + this.getClass().getCanonicalName() + - " using: " + this.getClass().getClassLoader()); - } - - public void setShipper(Shipper shipper) { - this.shipper = shipper; - } - - public void fulfillOrder(String order) { - shipper.processShipment(order + ", fulfilled"); - } - - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/Warehouse.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/Warehouse.java deleted file mode 100644 index 6f1f6b8730..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/java/supplychain/warehouse/Warehouse.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 supplychain.warehouse; - -/** - * This is the business interface of the Warehouse service component. - */ -public interface Warehouse { - - public void fulfillOrder(String order); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/complete-supplychain-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/complete-supplychain-sca-contribution.xml deleted file mode 100644 index 714d1826e1..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/complete-supplychain-sca-contribution.xml +++ /dev/null @@ -1,26 +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://supplychain" - xmlns:supplychain="http://supplychain"> - - <deployable composite="supplychain:supplychain"/> - -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-impl-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-impl-sca-contribution.xml deleted file mode 100644 index 7f7dc969e2..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-impl-sca-contribution.xml +++ /dev/null @@ -1,26 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.customer"/> - <import.java package="supplychain.customer"/> - <import.java package="supplychain.retailer"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-interface-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-interface-sca-contribution.xml deleted file mode 100644 index 7f7dc969e2..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-interface-sca-contribution.xml +++ /dev/null @@ -1,26 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.customer"/> - <import.java package="supplychain.customer"/> - <import.java package="supplychain.retailer"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-sca-contribution.xml deleted file mode 100644 index 8a2bec308f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/customer-sca-contribution.xml +++ /dev/null @@ -1,25 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.customer"/> - <import.java package="supplychain.retailer"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal-customer-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal-customer-sca-contribution.xml deleted file mode 100644 index c77c4c1c7e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal-customer-sca-contribution.xml +++ /dev/null @@ -1,26 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.customer"/> - <export.java package="supplychain.illegal"/> - <import.java package="supplychain.retailer"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal1-supplychain-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal1-supplychain-sca-contribution.xml deleted file mode 100644 index 210a68011f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal1-supplychain-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://supplychain" - xmlns:supplychain="http://supplychain"> - <deployable composite="supplychain:supplychain"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal2-supplychain-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal2-supplychain-sca-contribution.xml deleted file mode 100644 index d118cceef9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/illegal2-supplychain-sca-contribution.xml +++ /dev/null @@ -1,31 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <deployable composite="supplychain:supplychain"/> - - <import.java package="supplychain.customer"/> - <import.java package="supplychain.illegal"/> - <import.java package="supplychain.retailer"/> - <import.java package="supplychain.warehouse"/> - <import.java package="supplychain.shipper"/> - -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/retailer-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/retailer-sca-contribution.xml deleted file mode 100644 index d37b6659da..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/retailer-sca-contribution.xml +++ /dev/null @@ -1,25 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.retailer"/> - <import.java package="supplychain.warehouse"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/shipper-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/shipper-sca-contribution.xml deleted file mode 100644 index 77b28d9023..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/shipper-sca-contribution.xml +++ /dev/null @@ -1,25 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.shipper"/> - <import.java package="supplychain.customer"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/supplychain-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/supplychain-sca-contribution.xml deleted file mode 100644 index 8ec290a831..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/supplychain-sca-contribution.xml +++ /dev/null @@ -1,30 +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://supplychain" - xmlns:supplychain="http://supplychain"> - - <deployable composite="supplychain:supplychain"/> - - <import.java package="supplychain.customer"/> - <import.java package="supplychain.retailer"/> - <import.java package="supplychain.warehouse"/> - <import.java package="supplychain.shipper"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/warehouse-sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/warehouse-sca-contribution.xml deleted file mode 100644 index 1398416978..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/META-INF/warehouse-sca-contribution.xml +++ /dev/null @@ -1,25 +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://supplychain" - xmlns:supplychain="http://supplychain"> - <export.java package="supplychain.warehouse"/> - <import.java package="supplychain.shipper"/> -</contribution> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/illegalsupplychain.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/illegalsupplychain.composite deleted file mode 100644 index db1f0d34e7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/illegalsupplychain.composite +++ /dev/null @@ -1,48 +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"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://supplychain"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sp="http://supplychain"
- name="supplychain">
-
- <component name="CustomerComponent">
- <implementation.java class="supplychain.illegal.JavaCustomerComponentImpl" />
- <reference name="retailer" target="RetailerComponent" />
- </component>
-
- <component name="RetailerComponent">
- <implementation.java class="supplychain.retailer.JavaRetailerComponentImpl" />
- <reference name="warehouse" target="WarehouseComponent"/>
- </component>
-
- <component name="WarehouseComponent">
- <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
- <reference name="shipper" target="ShipperComponent" />
- </component>
-
- <component name="ShipperComponent">
- <implementation.java class="supplychain.shipper.JavaShipperComponentImpl" />
- <reference name="customer" target="CustomerComponent" />
- </component>
-
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/supplychain.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/supplychain.composite deleted file mode 100644 index 5be79b741a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/supplychain.composite +++ /dev/null @@ -1,48 +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"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://supplychain"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sp="http://supplychain"
- name="supplychain">
-
- <component name="CustomerComponent">
- <implementation.java class="supplychain.customer.JavaCustomerComponentImpl" />
- <reference name="retailer" target="RetailerComponent" />
- </component>
-
- <component name="RetailerComponent">
- <implementation.java class="supplychain.retailer.JavaRetailerComponentImpl" />
- <reference name="warehouse" target="WarehouseComponent"/>
- </component>
-
- <component name="WarehouseComponent">
- <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
- <reference name="shipper" target="ShipperComponent" />
- </component>
-
- <component name="ShipperComponent">
- <implementation.java class="supplychain.shipper.JavaShipperComponentImpl" />
- <reference name="customer" target="CustomerComponent" />
- </component>
-
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/warehouse/JavaWarehouseComponentImpl.componentType b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/warehouse/JavaWarehouseComponentImpl.componentType deleted file mode 100644 index a76fae8090..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-classes/src/main/resources/supplychain/warehouse/JavaWarehouseComponentImpl.componentType +++ /dev/null @@ -1,28 +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. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <service name="JavaWarehouseComponentImpl"> - <interface.java interface="supplychain.warehouse.Warehouse"/> - </service> - - <reference name="shipper"> - <interface.java interface="supplychain.shipper.Shipper"/> - </reference> -</componentType> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/pom.xml deleted file mode 100644 index b96b2a2482..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/pom.xml +++ /dev/null @@ -1,60 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-classloader-test</artifactId> - <name>Apache Tuscany Contribution Classloader tests</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-monitor</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java deleted file mode 100644 index 692f16f6f6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java +++ /dev/null @@ -1,373 +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 org.apache.tuscany.sca.test.contribution; - - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.URLClassLoader; - -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.resolver.ClassReference; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -/* - * - * Contribution ClassLoading integration tests - */ - -public class ContributionTestCase { - - private SupplyChain supplyChain; - - - @Before - public void setUp() throws Exception { - supplyChain = new SupplyChain(); - } - - - @After - public void tearDown() throws Exception { - - supplyChain.tearDown(); - - } - - - /** - * Test static ClassLoading for classes that are visible from contribution - * - * @throws Exception - */ - public void staticClassLoadingTestForVisibleClasses() throws Exception { - - Contribution customerContribution = supplyChain.getContribution("Customer"); - ClassReference customerClassRef = new ClassReference("supplychain.customer.Customer"); - customerClassRef = customerContribution.getModelResolver().resolveModel(ClassReference.class, customerClassRef); - Class<?> customerClass = customerClassRef.getJavaClass(); - - Class customerClassFromContribution = customerContribution.getClassLoader().loadClass("supplychain.customer.Customer"); - Assert.assertEquals(customerClass, customerClassFromContribution); - - Object customer = supplyChain.getCustomer(customerClass); - - Method m = customerClass.getMethod("purchaseGoods"); - m.invoke(customer); - - - m = customerClass.getMethod("outstandingOrderCount"); - - int retries = 10; - int outstandingCount = 1; - while (retries-- > 0) { - - outstandingCount = (int)(Integer)m.invoke(customer); - if (outstandingCount == 0) - break; - else - Thread.sleep(100); - } - Assert.assertEquals(0, outstandingCount); - - - } - - - /** - * Test dynamic ClassLoading for classes that are visible from contribution - * - * @throws Exception - */ - public void dynamicClassLoadingTestForVisibleClasses() throws Exception { - - Contribution customerContribution = supplyChain.getContribution("Customer"); - Contribution retailerContribution = supplyChain.getContribution("Retailer"); - Contribution warehouseContribution = supplyChain.getContribution("Warehouse"); - Contribution shipperContribution = supplyChain.getContribution("Shipper"); - Contribution supplyChainContribution = supplyChain.getContribution("SupplyChain"); - - ClassReference customerClassRef = new ClassReference("supplychain.customer.Customer"); - customerClassRef = customerContribution.getModelResolver().resolveModel(ClassReference.class, customerClassRef); - Class customerClass = customerClassRef.getJavaClass(); - - Class customerClassFromContribution = customerContribution.getClassLoader().loadClass("supplychain.customer.Customer"); - Assert.assertEquals(customerClass, customerClassFromContribution); - - Object customer = supplyChain.getCustomer(customerClass); - Assert.assertTrue(customerClass.isInstance(customer)); - - ClassReference retailerClassRef = new ClassReference("supplychain.retailer.Retailer"); - retailerClassRef = retailerContribution.getModelResolver().resolveModel(ClassReference.class, retailerClassRef); - Class retailerClass = retailerClassRef.getJavaClass(); - - Class retailerClassFromContribution = retailerContribution.getClassLoader().loadClass("supplychain.retailer.Retailer"); - Assert.assertEquals(retailerClass, retailerClassFromContribution); - - Class retailerClassFromCustomer = customerContribution.getClassLoader().loadClass("supplychain.retailer.Retailer"); - Assert.assertEquals(retailerClass, retailerClassFromCustomer); - - ClassReference warehouseClassRef = new ClassReference("supplychain.warehouse.Warehouse"); - warehouseClassRef = warehouseContribution.getModelResolver().resolveModel(ClassReference.class, warehouseClassRef); - Class warehouseClass = warehouseClassRef.getJavaClass(); - - Class warehouseClassFromContribution = warehouseContribution.getClassLoader().loadClass("supplychain.warehouse.Warehouse"); - Assert.assertEquals(warehouseClass, warehouseClassFromContribution); - - Class warehouseClassFromRetailer = retailerContribution.getClassLoader().loadClass("supplychain.warehouse.Warehouse"); - Assert.assertEquals(warehouseClass, warehouseClassFromRetailer); - - ClassReference shipperClassRef = new ClassReference("supplychain.shipper.Shipper"); - shipperClassRef = shipperContribution.getModelResolver().resolveModel(ClassReference.class, shipperClassRef); - Class shipperClass = shipperClassRef.getJavaClass(); - - Class shipperClassFromContribution = shipperContribution.getClassLoader().loadClass("supplychain.shipper.Shipper"); - Assert.assertEquals(shipperClass, shipperClassFromContribution); - - Class shipperClassFromWarehouse = shipperContribution.getClassLoader().loadClass("supplychain.shipper.Shipper"); - Assert.assertEquals(shipperClass, shipperClassFromWarehouse); - - Class customerClassFromShipper = shipperContribution.getClassLoader().loadClass("supplychain.customer.Customer"); - Assert.assertEquals(customerClass, customerClassFromShipper); - - Class customerClassFromSupplyChain = supplyChainContribution.getClassLoader().loadClass("supplychain.customer.Customer"); - Assert.assertEquals(customerClass, customerClassFromSupplyChain); - Class retailerClassFromSupplyChain = supplyChainContribution.getClassLoader().loadClass("supplychain.retailer.Retailer"); - Assert.assertEquals(retailerClass, retailerClassFromSupplyChain); - Class warehouseClassFromSupplyChain = supplyChainContribution.getClassLoader().loadClass("supplychain.warehouse.Warehouse"); - Assert.assertEquals(warehouseClass, warehouseClassFromSupplyChain); - Class shipperClassFromSupplyChain = supplyChainContribution.getClassLoader().loadClass("supplychain.shipper.Shipper"); - Assert.assertEquals(shipperClass, shipperClassFromSupplyChain); - - } - - /** - * Test dynamic ClassLoading for classes that are visible from contribution - * - * @throws Exception - */ - public void dynamicClassLoadingTestForNonImportedClasses() throws Exception { - - Contribution customerContribution = supplyChain.getContribution("Customer"); - Contribution shipperContribution = supplyChain.getContribution("Shipper"); - - Class customerClass = customerContribution.getClassLoader().loadClass("supplychain.customer.Customer"); - Class shipperClass = shipperContribution.getClassLoader().loadClass("supplychain.shipper.Shipper"); - - try { - customerClass.getClassLoader().loadClass("supplychain.warehouse.Warehouse"); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - try { - customerClass.getClassLoader().loadClass("supplychain.shipper.JavaShipperComponentImpl"); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - - try { - Class.forName("supplychain.warehouse.Warehouse", true, customerClass.getClassLoader()); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - try { - Class.forName("supplychain.shipper.JavaShipperComponentImpl", true, customerClass.getClassLoader()); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - - try { - shipperClass.getClassLoader().loadClass("supplychain.warehouse.JavaWarehouseComponentImpl"); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - try { - shipperClass.getClassLoader().loadClass("supplychain.retailer.Retailer"); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - - try { - Class.forName("supplychain.warehouse.JavaWarehouseComponentImpl", true, shipperClass.getClassLoader()); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - try { - Class.forName("supplychain.retailer.Retailer", true, shipperClass.getClassLoader()); - Assert.fail("Non-imported class loaded incorrectly"); - } catch (ClassNotFoundException e) { - } - - - } - - - /** - * This test ensures that classes from imported packages can be statically loaded - * from other contributions even though the classes are not on CLASSPATH or on the - * parent ClassLoader, or the thread context ClassLoader. - * - * @throws Exception - */ - @Test - public void testValidStaticClassLoading() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader()); - - staticClassLoadingTestForVisibleClasses(); - } - - /** - * This test ensures that all imported classes are loaded from the exporting contributions - * rather than the parent classLoader. If any of the interface classes were incorrectly loaded - * through the parent ClassLoader, LinkageError should result. - * - * @throws Exception - */ - @Test - public void testValidStaticClassLoadingWithContributionsInParentClassLoader() throws Exception { - - - URLClassLoader parentClassLoader = new URLClassLoader( - supplyChain.getContributionURLs(), - this.getClass().getClassLoader()); - - supplyChain.setUp(parentClassLoader); - - staticClassLoadingTestForVisibleClasses(); - } - - - /** - * This test ensures that classes from imported packages can be dynamically loaded from - * other contributions even though the classes are not on CLASSPATH or on the - * parent ClassLoader, or the thread context ClassLoader. - * - * @throws Exception - */ - @Test - public void testValidDynamicClassLoading() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader()); - - dynamicClassLoadingTestForVisibleClasses(); - } - - /** - * This test ensures that all imported classes are dynamically loaded from the exporting - * contributions rather than the parent classLoader. If any of the interface classes were - * incorrectly loaded through the parent, NoClassDefFoundError or LinkageError should result. - * - * @throws Exception - */ - @Test - public void testValidDynamicClassLoadingWithContributionsInParentClassLoader() throws Exception { - - - URLClassLoader parentClassLoader = new URLClassLoader( - supplyChain.getContributionURLs(), - this.getClass().getClassLoader()); - - supplyChain.setUp(parentClassLoader); - - dynamicClassLoadingTestForVisibleClasses(); - } - - @Test - public void testIllegalStaticClassLoading1() throws Exception { - // FIXME we have commented this code as we are not throwing exceptions anymore - // need to deal with monitor logs to catch the errors. - - /*try { - supplyChain.setUp(this.getClass().getClassLoader(), SupplyChain.SUPPLYCHAIN_ILLEGAL_1); - - Assert.fail("Composite containing unresolved references resolved incorrectly"); - } catch (ContributionResolveException e) { - }*/ - } - - @Test - public void testIllegalStaticClassLoading2() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader(), SupplyChain.SUPPLYCHAIN_ILLEGAL_2); - - Contribution customerContribution = supplyChain.getContribution("Customer"); - ClassReference customerClassRef = new ClassReference("supplychain.customer.Customer"); - customerClassRef = customerContribution.getModelResolver().resolveModel(ClassReference.class, customerClassRef); - Class<?> customerClass = customerClassRef.getJavaClass(); - - Object customer = supplyChain.getCustomer(customerClass); - - try { - Method m = customerClass.getMethod("purchaseGoods"); - m.invoke(customer); - - Assert.fail("Classloading exception not thrown as expected"); - } catch (InvocationTargetException e) { - - Throwable cause = e.getCause(); - Assert.assertTrue(cause instanceof NoClassDefFoundError); - Assert.assertTrue(cause.getMessage().indexOf("JavaWarehouseComponentImpl") > -1); } - - } - - /** - * This test ensures that classes from imported packages can be dynamically loaded from - * other contributions even though the classes are not on CLASSPATH or on the - * parent ClassLoader, or the thread context ClassLoader. - * - * @throws Exception - */ - @Test - public void testIllegalDynamicClassLoading() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader()); - - dynamicClassLoadingTestForNonImportedClasses(); - } - - - /** - * Self-contained contribution containing composites, componentType files and implementations - * should not require import/export statements for these files to find each other or for Tuscany - * to load these files. - * @throws Exception - */ - @Test - public void testSelfContainedContribution() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader(), SupplyChain.SUPPLYCHAIN_SELFCONTAINED); - - staticClassLoadingTestForVisibleClasses(); - } - - @Test - public void testContributionsWithSplitPackage() throws Exception { - - supplyChain.setUp(this.getClass().getClassLoader(), SupplyChain.SUPPLYCHAIN_SPLITPACKAGE); - - staticClassLoadingTestForVisibleClasses(); - - dynamicClassLoadingTestForNonImportedClasses(); - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/SupplyChain.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/SupplyChain.java deleted file mode 100644 index 1ec7aaaa3a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/SupplyChain.java +++ /dev/null @@ -1,231 +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 org.apache.tuscany.sca.test.contribution; - - -import java.io.File; -import java.net.URL; -import java.util.Hashtable; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.junit.Assert; - -/* - * - * Contribution ClassLoading integration tests - */ - -public class SupplyChain { - - public static final int SUPPLYCHAIN = 0; - public static final int SUPPLYCHAIN_ILLEGAL_1 = 1; - public static final int SUPPLYCHAIN_ILLEGAL_2 = 2; - public static final int SUPPLYCHAIN_SELFCONTAINED = 3; - public static final int SUPPLYCHAIN_SPLITPACKAGE = 4; - - private String folderName = "../contribution-classes/target/classes"; - - private String customerJarName = "Customer"; - private String retailerJarName = "Retailer"; - private String warehouseJarName = "Warehouse"; - private String shipperJarName = "Shipper"; - private String supplychainJarName = "SupplyChain"; - private String illegalSupplyChain1JarName = "IllegalSupplyChain1"; - private String illegalSupplyChain2JarName = "IllegalSupplyChain2"; - private String illegalCustomerJarName = "IllegalCustomer"; - private String completeSupplychainJarName = "CompleteSupplyChain"; - private String customerInterfaceJarName = "CustomerInterface"; - private String customerImplJarName = "CustomerImpl"; - - - private EmbeddedSCADomain domain; - private ContributionService contributionService; - private int supplyChainVersion; - - private Hashtable<String, Contribution> contributions = new Hashtable<String, Contribution>(); - - private URL customerContribURL; - private URL retailerContribURL; - private URL warehouseContribURL; - private URL shipperContribURL; - private URL supplyChainContribURL; - private URL illegalSupplyChain1ContribURL; - private URL illegalSupplyChain2ContribURL; - private URL illegalCustomerContribURL; - private URL completeSupplyChainContribURL; - private URL customerInterfaceContribURL; - private URL customerImplContribURL; - - public SupplyChain() throws Exception { - - customerContribURL = new File(folderName + "/" + customerJarName + ".jar").toURI().toURL(); - retailerContribURL = new File(folderName + "/" + retailerJarName + ".jar").toURI().toURL(); - warehouseContribURL = new File(folderName + "/" + warehouseJarName + ".jar").toURI().toURL(); - shipperContribURL = new File(folderName + "/" + shipperJarName + ".jar").toURI().toURL(); - supplyChainContribURL = new File(folderName + "/" + supplychainJarName + ".jar").toURI().toURL(); - illegalSupplyChain1ContribURL = new File(folderName + "/" + illegalSupplyChain1JarName + ".jar").toURI().toURL(); - illegalSupplyChain2ContribURL = new File(folderName + "/" + illegalSupplyChain2JarName + ".jar").toURI().toURL(); - illegalCustomerContribURL = new File(folderName + "/" + illegalCustomerJarName + ".jar").toURI().toURL(); - completeSupplyChainContribURL = new File(folderName + "/" + completeSupplychainJarName + ".jar").toURI().toURL(); - customerInterfaceContribURL = new File(folderName + "/" + customerInterfaceJarName + ".jar").toURI().toURL(); - customerImplContribURL = new File(folderName + "/" + customerImplJarName + ".jar").toURI().toURL(); - } - - public void setUp(ClassLoader parentClassLoader) throws Exception { - this.setUp(parentClassLoader, SUPPLYCHAIN); - } - - public void setUp(ClassLoader parentClassLoader, int supplyChainVersion) throws Exception { - - this.supplyChainVersion = supplyChainVersion; - - Thread.currentThread().setContextClassLoader(parentClassLoader); - - //Create an embedded SCA domain - domain = new EmbeddedSCADomain(parentClassLoader, "http://localhost"); - - //Start the domain - domain.start(); - - this.contributionService = domain.getContributionService(); - - addContributions(supplyChainVersion); - } - - protected void addContributions(int supplyChainVersion) throws Exception { - - Contribution contribution; - - if (supplyChainVersion != SUPPLYCHAIN_SELFCONTAINED) { - contribution = contributionService.contribute("Shipper", shipperContribURL, true); - contributions.put("Shipper", contribution); - contribution = contributionService.contribute("Warehouse", warehouseContribURL, true); - contributions.put("Warehouse", contribution); - contribution = contributionService.contribute("Retailer", retailerContribURL, true); - contributions.put("Retailer", contribution); - } - - switch (supplyChainVersion) { - case SUPPLYCHAIN: - contribution = contributionService.contribute("Customer", customerContribURL, true); - contributions.put("Customer", contribution); - - contribution = contributionService.contribute("SupplyChain", supplyChainContribURL, true); - contributions.put("SupplyChain", contribution); - break; - case SUPPLYCHAIN_ILLEGAL_1: - contribution = contributionService.contribute("Customer", customerContribURL, true); - contributions.put("Customer", contribution); - - contribution = contributionService.contribute("SupplyChain", illegalSupplyChain1ContribURL, true); - contributions.put("SupplyChain", contribution); - break; - case SUPPLYCHAIN_ILLEGAL_2: - contribution = contributionService.contribute("Customer", illegalCustomerContribURL, true); - contributions.put("Customer", contribution); - - contribution = contributionService.contribute("SupplyChain", illegalSupplyChain2ContribURL, true); - contributions.put("SupplyChain", contribution); - break; - case SUPPLYCHAIN_SELFCONTAINED: - contribution = contributionService.contribute("SupplyChain", completeSupplyChainContribURL, true); - contributions.put("SupplyChain", contribution); - break; - case SUPPLYCHAIN_SPLITPACKAGE: - contribution = contributionService.contribute("Customer", customerInterfaceContribURL, true); - contributions.put("Customer", contribution); - - contribution = contributionService.contribute("CustomerImpl", customerImplContribURL, true); - contributions.put("CustomerImpl", contribution); - - contribution = contributionService.contribute("SupplyChain", supplyChainContribURL, true); - contributions.put("SupplyChain", contribution); - break; - } - - // SUPPLYCHAIN_ILLEGAL_1 should throw an exception when the composite is resolved, and hence - // should not get this far. - Assert.assertTrue(supplyChainVersion != SUPPLYCHAIN_ILLEGAL_1); - - - for (Contribution c : contributions.values()) { - - for (Composite deployable : c.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - } - - // Start Components from my composite - for (Composite deployable : contributions.get("SupplyChain").getDeployables() ) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void tearDown() throws Exception { - - if (domain == null) - return; - - for (String contributionURI : contributions.keySet()) { - contributionService.remove(contributionURI); - } - - - if (contributions.get("SupplyChain") != null) { - // Stop Components from my composite - for (Composite deployable : contributions.get("SupplyChain").getDeployables() ) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - } - - domain.stop(); - - domain.close(); - } - - public Contribution getContribution(String uri) { - if (supplyChainVersion == SUPPLYCHAIN_SELFCONTAINED) - return contributions.get("SupplyChain"); - else - return contributions.get(uri); - } - - public Object getCustomer(Class<?> customerClass) { - return domain.getService(customerClass, "CustomerComponent"); - } - - public URL[] getContributionURLs() { - return new URL[] { - customerContribURL, - retailerContribURL, - warehouseContribURL, - shipperContribURL, - supplyChainContribURL - }; - } - - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/TuscanyClassloadingTestCaseFIXME.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/TuscanyClassloadingTestCaseFIXME.java deleted file mode 100644 index b123951ef6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/TuscanyClassloadingTestCaseFIXME.java +++ /dev/null @@ -1,381 +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 org.apache.tuscany.sca.test.contribution;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.osoa.sca.ServiceReference;
-
-/*
- *
- * Contribution ClassLoading integration tests
- */
-
-//FIXME This test case needs some serious rework!
-// First it is very dependent on the names of the Tuscany runtime JARs
-// and this is going to be difficult to maintain
-// Second its usage of reflection requires the Tuscany implementation classes
-// to be made public and this breaks isolation between modules.
-public class TuscanyClassloadingTestCaseFIXME {
-
- // private static final int SCA_API = 1;
- // private static final int TUSCANY_CORE_SPI = 2;
- // private static final int TUSCANY_RUNTIME = 3;
- // private static final int TUSCANY_EXTENSIONS = 4;
- // private static final int TUSCANY_DEPENDENCIES = 0;
-
- private static final String[] scaApiJars = {"sca-api"};
- private static final String[] tuscanyCoreSpiJars =
- {"core-spi", "interface", "interface-java", "interface-wsdl", "assembly", "policy", "databinding",
- "contribution", "definitions"};
- private static final String[] tuscanyRuntimeJars =
- {
-
- "binding-sca-xml", "binding-sca", "assembly-java-dsl", "assembly-xml", "assembly-xsd", "contribution-impl",
- "contribution-java", "contribution-namespace", "core-databinding", "core-spring", "core", "definitions-xml",
- "domain-api", "domain-impl", "domain", "extension-helper", "host-embedded", "interface-java-xml",
- "interface-wsdl-xml", "java2wsdl", "node-api", "node-impl", "node", "osgi-runtime", "policy-logging",
- "policy-security", "policy-transaction", "policy-xml", "wsdl2java"};
- private static final String[] tuscanyExtensionJars =
- {"binding-dwr", "binding-ejb", "binding-feed", "binding-http", "binding-jms", "binding-jsonrpc",
- "binding-notification", "binding-rmi", "binding-sca-axis2", "binding-ws-axis2", "binding-ws-xml",
- "binding-ws", "databinding-axiom", "databinding-fastinfoset", "databinding-jaxb", "databinding-json",
- "databinding-saxon", "databinding-sdo-axiom", "databinding-sdo", "databinding-xmlbeans", "host-http",
- "host-jetty", "host-rmi", "host-tomcat", "host-webapp", "implementation-das.jar", "implementation-data.jar",
- "implementation-java-runtime", "implementation-java-xml", "implementation-java",
- "implementation-node-runtime", "implementation-node-xml", "implementation-node",
- "implementation-notification", "implementation-osgi", "implementation-resource", "implementation-script",
- "implementation-spring", "implementation-xquery", "contribution-osgi"};
-
- private Class<?> embeddedDomainClass;
- Object domain;
-
- @Before
- public void setUp() throws Exception {
-
- embeddedDomainClass = getEmbeddedDomainClass();
-
- Constructor c = embeddedDomainClass.getConstructor(ClassLoader.class, String.class);
- // Create an embedded domain
- domain = c.newInstance(embeddedDomainClass.getClassLoader(), "http://localhost");
-
- // Start the domain
- invokeNoArgsMethod(domain, "start");
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- // Stop the domain
- invokeNoArgsMethod(domain, "stop");
-
- }
-
- /**
- * Create a ClassLoader hierarchy for Tuscany runtime
- * Dependencies <- SCA-API <- Core-SPI+ Runtime <- Extensions
- * Load the embedded SCA domain class using the runtime ClassLoader
- *
- * @return embedded SCA domain class
- * @throws Exception
- */
- private Class<?> getEmbeddedDomainClass() throws Exception {
-
- URL[] scaApiUrls;
- URL[] runtimeUrls;
- URL[] extensionUrls;
- URL[] dependencyUrls;
-
- // When the test is run under Eclipse, the ClassLoader for the test is
- // sun.misc.Launcher$AppClassLoader. The first code path is taken.
- // When the test is run under Maven, the ClassLoader for the test is
- // org.apache.maven.surefire.booter.IsolatedClassLoader, which is a subclass
- // of URLClassLoader. The second code path is taken.
- if (!(this.getClass().getClassLoader() instanceof URLClassLoader)) {
- String classPath = System.getProperty("java.class.path");
- String[] classPathEntries = classPath.split(System.getProperty("path.separator"));
- HashSet<String> dependentJars = new HashSet<String>();
- for (int i = 0; i < classPathEntries.length; i++) {
- dependentJars.add(classPathEntries[i]);
- }
-
- scaApiUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars, scaApiJars);
- runtimeUrls =
- getTuscanyClassLoaderURLs(classPathEntries, dependentJars, tuscanyCoreSpiJars, tuscanyRuntimeJars);
- extensionUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars, tuscanyExtensionJars);
- dependencyUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars);
- } else {
- HashSet<URL> dependentJars = new HashSet<URL>();
- URL[] classPathEntries = ((URLClassLoader)this.getClass().getClassLoader()).getURLs();
- for (int i = 0; i < classPathEntries.length; i++) {
- dependentJars.add(classPathEntries[i]);
- }
- scaApiUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars, scaApiJars);
- runtimeUrls =
- getTuscanyClassLoaderURLs(classPathEntries, dependentJars, tuscanyCoreSpiJars, tuscanyRuntimeJars);
- extensionUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars, tuscanyExtensionJars);
- dependencyUrls = getTuscanyClassLoaderURLs(classPathEntries, dependentJars);
-
- }
-
- boolean useSingleClassLoader =
- (scaApiUrls == null || scaApiUrls.length == 0) || (runtimeUrls == null || runtimeUrls.length == 0)
- || (extensionUrls == null || extensionUrls.length == 0)
- || (dependencyUrls == null || dependencyUrls.length == 0);
-
- if (useSingleClassLoader) {
- return EmbeddedSCADomain.class;
- } else {
-
- ClassLoader dependencyLoader = new URLClassLoader(dependencyUrls, null);
- ClassLoader scaApiLoader = new URLClassLoader(scaApiUrls, dependencyLoader);
- ClassLoader runtimeClassLoader = new URLClassLoader(runtimeUrls, scaApiLoader);
- ClassLoader extensionClassLoader = new URLClassLoader(extensionUrls, runtimeClassLoader);
-
- Class<?> serviceDiscoveryClass = runtimeClassLoader.loadClass(ServiceDiscovery.class.getName());
- Method getInstanceMethod = serviceDiscoveryClass.getMethod("getInstance");
- Object serviceDiscoveryObj = getInstanceMethod.invoke(null);
- Method registerClassLoaderMethod =
- serviceDiscoveryClass.getMethod("registerClassLoader", ClassLoader.class);
- registerClassLoaderMethod.invoke(serviceDiscoveryObj, extensionClassLoader);
-
- Thread.currentThread().setContextClassLoader(extensionClassLoader);
-
- return runtimeClassLoader.loadClass(EmbeddedSCADomain.class.getName());
-
- }
-
- }
-
- /**
- * From the list of entries in the test ClassLoader, match
- * Tuscany jars corresponding to a ClassLoader, and return the list
- * of matching entries as URLs.
- * This method is used when the test is run under eclipse, using CLASSPATH
- * based application ClassLoader.
- *
- * @param classPathEntries List of entries on CLASSPATH
- * @param dependentJars Complete set of jars, remove jars corresponding to this
- * ClassLoader from the set.
- * @param jars List of Tuscany jars corresponding to this ClassLoader
- * @return Matching URLs for the ClassLoader
- * @throws IOException
- */
- private URL[] getTuscanyClassLoaderURLs(String[] classPathEntries, HashSet<String> dependentJars, String[]... jars)
- throws IOException {
-
- String pathSeparator = System.getProperty("file.separator");
- HashSet<String> classPathEntrySet;
-
- if (jars.length == 0)
- classPathEntrySet = dependentJars;
- else {
- classPathEntrySet = new HashSet<String>();
-
- for (int i = 0; i < classPathEntries.length; i++) {
-
- String classPathEntry = classPathEntries[i];
- for (int j = 0; j < jars.length; j++) {
- String[] jarList = jars[j];
- if (jarList != null) {
- for (int k = 0; k < jarList.length; k++) {
- String jarName = "tuscany-" + jarList[k];
- String alternateJarName = "modules" + pathSeparator + jarList[k];
- if (classPathEntry.indexOf(jarName) >= 0 || classPathEntry.indexOf(alternateJarName) >= 0) {
- classPathEntrySet.add(classPathEntry);
- dependentJars.remove(classPathEntry);
- }
- }
- }
- }
- }
-
- }
- ArrayList<URL> urls = new ArrayList<URL>();
-
- for (String fileName : classPathEntrySet) {
- File file = new File((String)fileName);
- if (!file.exists()) {
- throw new FileNotFoundException(fileName);
-
- } else {
- urls.add(file.toURL());
-
- }
- }
-
- return (URL[])urls.toArray(new URL[urls.size()]);
- }
-
- /**
- * From the list of URLs of the test ClassLoader, match
- * Tuscany jars corresponding to a ClassLoader, and return the matching URLs
- * This method is used when the test is run under Maven. The test ClassLoader is
- * org.apache.maven.surefire.booter.IsolatedClassLoader, which is a subclass
- * of URLClassLoader
- *
- * @param classPathEntries List of URLs from the test ClassLoader
- * @param dependentJars Complete set of jars, remove jars corresponding to this
- * ClassLoader from the set.
- * @param jars List of Tuscany jars corresponding to this ClassLoader
- * @return Matching URLs for the ClassLoader
- * @throws IOException
- */
- private URL[] getTuscanyClassLoaderURLs(URL[] classPathEntries, HashSet<URL> dependentJars, String[]... jars)
- throws IOException {
-
- String pathSeparator = System.getProperty("file.separator");
- HashSet<URL> classPathEntrySet;
-
- if (jars.length == 0)
- classPathEntrySet = dependentJars;
- else {
- classPathEntrySet = new HashSet<URL>();
-
- for (int i = 0; i < classPathEntries.length; i++) {
-
- URL classPathEntry = classPathEntries[i];
- String classPathEntryStr = classPathEntry.getPath();
- for (int j = 0; j < jars.length; j++) {
- String[] jarList = jars[j];
- if (jarList != null) {
- for (int k = 0; k < jarList.length; k++) {
- String jarName = "tuscany-" + jarList[k];
- String alternateJarName = "modules" + pathSeparator + jarList[k];
- if (classPathEntryStr.indexOf(jarName) >= 0 || classPathEntryStr.indexOf(alternateJarName) >= 0) {
- classPathEntrySet.add(classPathEntry);
- dependentJars.remove(classPathEntry);
- }
- }
- }
- }
- }
-
- }
- return (URL[])classPathEntrySet.toArray(new URL[classPathEntrySet.size()]);
- }
-
- private Object invokeNoArgsMethod(Object obj, String methodName) throws Exception {
-
- return obj.getClass().getMethod(methodName).invoke(obj);
- }
-
- private Object invokeOneArgMethod(Object obj, String methodName, Class argType, Object arg) throws Exception {
-
- return obj.getClass().getMethod(methodName, argType).invoke(obj, arg);
- }
-
- /**
- *
- * Load Tuscany runtime using multiple ClassLoaders, and run supplychain
- * test.
- *
- * @throws Exception
- */
- @SuppressWarnings("unchecked")
- @Test
- public void test() throws Exception {
-
- ClassLoader runtimeClassloader = embeddedDomainClass.getClassLoader();
-
- if (runtimeClassloader == this.getClass().getClassLoader()) {
- System.out.println("Runtime and test loaded using the same classloader " + runtimeClassloader);
- } else {
- System.out
- .println("Running test using separate Tuscany classloaders, runtime classloader=" + runtimeClassloader);
- ClassLoader apiClassLoader =
- runtimeClassloader.loadClass(ServiceReference.class.getName()).getClassLoader();
- Assert.assertTrue(apiClassLoader != runtimeClassloader);
-
- try {
- runtimeClassloader.loadClass("org.apache.tuscany.sca.implementation.java.JavaImplementation");
- Assert.fail("Loaded extension class incorrectly from runtimeClassLoader");
- } catch (ClassNotFoundException e) {
- }
-
- }
-
- // Contribute supplychain (as single contribution)
- Object contributionService = invokeNoArgsMethod(domain, "getContributionService");
- Method contributeMethod =
- contributionService.getClass().getMethod("contribute", String.class, URL.class, boolean.class);
-
- String folderName = "../contribution-classes/target/classes";
- String supplychainJarName = "CompleteSupplyChain";
- URL supplyChainContribURL = new File(folderName + "/" + supplychainJarName + ".jar").toURL();
- Object contribution = contributeMethod.invoke(contributionService, "SupplyChain", supplyChainContribURL, true);
-
- Object composite = ((List)invokeNoArgsMethod(contribution, "getDeployables")).get(0);
- Object domainComposite = invokeNoArgsMethod(domain, "getDomainComposite");
- List includes = (List)invokeNoArgsMethod(domainComposite, "getIncludes");
- includes.add(composite);
- //Object compositeBuilder = invokeNoArgsMethod(domain, "getCompositeBuilder");
- Object compositeActivator = invokeNoArgsMethod(domain, "getCompositeActivator");
-
- Class compositeClass = embeddedDomainClass.getClassLoader().loadClass(Composite.class.getName());
- invokeOneArgMethod(domain, "buildComposite", compositeClass, composite);
- invokeOneArgMethod(compositeActivator, "activate", compositeClass, composite);
- invokeOneArgMethod(compositeActivator, "start", compositeClass, composite);
-
- // Get customer service
- Method getClassLoaderMethod = contribution.getClass().getMethod("getClassLoader");
- ClassLoader classLoader = (ClassLoader)getClassLoaderMethod.invoke(contribution);
-
- Class customerClass = classLoader.loadClass("supplychain.customer.Customer");
- Method getServiceMethod = embeddedDomainClass.getMethod("getService", Class.class, String.class);
- Object customer = getServiceMethod.invoke(domain, customerClass, "CustomerComponent");
-
- // Invoke purchaseGoods
- Method m = customerClass.getMethod("purchaseGoods");
- m.invoke(customer);
-
- m = customerClass.getMethod("outstandingOrderCount");
-
- int retries = 10;
- int outstandingCount = 1;
- while (retries-- > 0) {
-
- outstandingCount = (int)(Integer)m.invoke(customer);
- if (outstandingCount == 0)
- break;
- else
- Thread.sleep(100);
- }
- Assert.assertEquals(0, outstandingCount);
-
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/pom.xml deleted file mode 100644 index 928701e060..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-classloader/pom.xml +++ /dev/null @@ -1,51 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-classloader</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany Contribution ClassLoader Integration Tests</name> - - <modules> - <module>contribution-classes</module> - <module>contribution-test</module> - </modules> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/pom.xml deleted file mode 100644 index 74065fb4f5..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/pom.xml +++ /dev/null @@ -1,51 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-folder</artifactId> - <name>Apache Tuscany SCA iTest Folder and ZIP Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java deleted file mode 100644 index 9f9c15c14d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java +++ /dev/null @@ -1,53 +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.
- */
-
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import calculator.CalculatorService;
-
-
-
-/**
- * Test SCADomain.newInstance and invocation of a service.
- *
- * @version $Rev: 608205 $ $Date: 2008-01-02 20:29:05 +0000 (Wed, 02 Jan 2008) $
- */
-public class ContributionFolderTestCase extends TestCase {
-
- private SCADomain domain;
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("myDomain", "src/test/resources/repository2/folderWithJars", null );
- }
-
- public void testInvoke() throws Exception {
- CalculatorService service = domain.getService(CalculatorService.class, "CalculatorServiceComponent");
- assertEquals(3.0, service.add(1, 2));
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionZIPTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionZIPTestCase.java deleted file mode 100644 index 98bbe3935a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/ContributionZIPTestCase.java +++ /dev/null @@ -1,53 +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.
- */
-
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import calculator.CalculatorService;
-
-
-
-/**
- * Test SCADomain.newInstance and invocation of a service.
- *
- * @version $Rev: 608205 $ $Date: 2008-01-02 20:29:05 +0000 (Wed, 02 Jan 2008) $
- */
-public class ContributionZIPTestCase extends TestCase {
-
- private SCADomain domain;
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("myDomain", "src/test/resources/repository3/contribution.zip", null );
- }
-
- public void testInvoke() throws Exception {
- CalculatorService service = domain.getService(CalculatorService.class, "CalculatorServiceComponent");
- assertEquals(3.0, service.add(1, 2));
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/calculator/CalculatorService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index a318cf50d9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/java/calculator/CalculatorService.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;
-
-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/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite deleted file mode 100644 index ac88b2ac48..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +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="Calculator">
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent" />
- <reference name="subtractService" target="SubtractServiceComponent" />
- <reference name="multiplyService" target="MultiplyServiceComponent" />
- <reference name="divideService" target="DivideServiceComponent" />
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 8b60ae590c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +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"
- xmlns:sample="http://sample">
- <deployable composite="sample:Calculator"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar Binary files differdeleted file mode 100644 index 7e4a7132a3..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar Binary files differdeleted file mode 100644 index 0e16e11b0b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository3/contribution.zip b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository3/contribution.zip Binary files differdeleted file mode 100644 index b293aa4bcc..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-folder/src/test/resources/repository3/contribution.zip +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/pom.xml deleted file mode 100644 index 8d731c07d7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/pom.xml +++ /dev/null @@ -1,67 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-composite</artifactId> - <name>Apache Tuscany SCA iTest Contribution Export</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java deleted file mode 100644 index e65422136f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.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 hello;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the Hello service.
- */
-@Remotable
-public interface Hello {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java deleted file mode 100644 index 5369c18497..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java +++ /dev/null @@ -1,33 +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 hello;
-
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(Hello.class)
-public class HelloImpl implements Hello {
-
- public String getGreetings(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 3c14560a56..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +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://hello"
- xmlns:hello="http://hello">
- <deployable composite="hello:hello"/>
- <export namespace="http://hello"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/hello.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/hello.composite deleted file mode 100644 index 636b7111d9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/main/resources/hello.composite +++ /dev/null @@ -1,31 +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://hello"
- xmlns:hello="http://hello"
- name="hello">
-
- <service name="HelloService" promote="HelloServiceComponent"/>
-
- <component name="HelloServiceComponent">
- <implementation.java class="hello.HelloImpl" />
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java deleted file mode 100644 index 72b77564d2..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java +++ /dev/null @@ -1,91 +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 org.apache.tuscany.sca.test.contribution;
-
-import hello.Hello;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-/**
- * Tests that the helloworld server is available
- */
-public class HelloTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
-
- @Override
- protected void setUp() throws Exception {
- // Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- // Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- URL helloURL = getContributionURL(Hello.class);
-
- // File helloContrib = new File("./target/classes/");
- // URL helloURL = helloContrib.toURL();
- Contribution consumerContribution =
- contributionService.contribute("http://import-export/hello", helloURL, false);
- Composite consumerComposite = consumerContribution.getDeployables().get(0);
- domain.getDomainComposite().getIncludes().add(consumerComposite);
- domain.buildComposite(consumerComposite);
-
- // Start Components from my composite
- domain.getCompositeActivator().activate(consumerComposite);
- domain.getCompositeActivator().start(consumerComposite);
- }
-
- private URL getContributionURL(Class<?> cls) throws MalformedURLException {
- String flag = "/" + cls.getName().replace('.', '/') + ".class";
- URL url = cls.getResource(flag);
- String root = url.toExternalForm();
- root = root.substring(0, root.length() - flag.length() + 1);
- if (root.startsWith("jar:") && root.endsWith("!/")) {
- root = root.substring(4, root.length() - 2);
- }
- url = new URL(root);
- return url;
- }
-
- public void testHello() throws IOException {
- Hello hello = domain.getService(Hello.class, "HelloServiceComponent");
- assertNotNull(hello);
- assertEquals(hello.getGreetings("lresende"), "Hello lresende");
- }
-
- @Override
- public void tearDown() throws Exception {
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/pom.xml deleted file mode 100644 index 85c50da029..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/pom.xml +++ /dev/null @@ -1,67 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-java</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java Export</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 74d22ed830..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index dc33dfa560..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/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://helloworld"
- xmlns:helloworld="http://helloworld">
- <export.java package="helloworld"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType deleted file mode 100644 index 5a14b41650..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <service name="HelloWorldService"> - <interface.java interface="helloworld.HelloWorldService" /> - </service> - -</componentType> -
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/pom.xml deleted file mode 100644 index 8d5eb73174..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/pom.xml +++ /dev/null @@ -1,31 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-resource</artifactId> - <name>Apache Tuscany SCA iTest Contribution Resource Export</name> - -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f11eacb416..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/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://store" - xmlns:helloworld="http://store"> - <export.resource uri="ufservices/store.html"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html deleted file mode 100644 index 1ff281373a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html +++ /dev/null @@ -1,27 +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. ---> -<html> -<head> -<title>Store</TITLE> -</head> - -<body> -<h1>Sample Store Page</h1> -</body> -</html> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/pom.xml deleted file mode 100644 index 1793d8e70a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/pom.xml +++ /dev/null @@ -1,31 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-wsdl</artifactId> - <name>Apache Tuscany SCA iTest Contribution WSDL Export</name> - -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b7394ec14b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/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://helloworld"
- xmlns:helloworld="http://helloworld">
- <export namespace="http://helloworld"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl deleted file mode 100644 index 9b31363e1a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +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.
--->
-
-<wsdl:definitions targetNamespace="http://helloworld"
- xmlns:tns="http://helloworld"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:tns2="http://helloworld2"
- targetNamespace="http://helloworld"
- elementFormDefault="qualified">
-
- <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" />
-
- <element name="getGreetings" type="tns2:getGreetingsType"/>
- <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/>
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd deleted file mode 100644 index d3c83b08c6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +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.
--->
-<schema targetNamespace="http://helloworld2"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ns="http://helloworld2">
-
- <complexType name="getGreetingsType">
- <sequence>
- <element name="name" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name="getGreetingsResponseType">
- <sequence>
- <element name="getGreetingsReturn" type="string"/>
- </sequence>
- </complexType>
-</schema>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/pom.xml deleted file mode 100644 index 35c0314f65..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/pom.xml +++ /dev/null @@ -1,73 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-composite</artifactId> - <name>Apache Tuscany SCA iTest Contribution Import</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-composite</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 966f56d7d5..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +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 helloworld;
-
-import hello.Hello;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldImpl implements HelloWorldService {
- @Reference
- protected Hello helloServiceRef;
-
- public String getGreetings(String name) {
- return helloServiceRef.getGreetings(name);
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 3d43290380..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +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 helloworld;
-
-import java.io.IOException;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This server program shows how to create an SCA runtime, and start it which
- * activates the helloworld Web service endpoint.
- */
-public class HelloWorldServer {
-
- public static void main(String[] args) {
-
- SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite");
-
- try {
- System.out.println("HelloWorld server started (press enter to shutdown)");
- System.in.read();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- scaDomain.close();
- System.out.println("HelloWorld server stopped");
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 74d22ed830..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 9f3f5be452..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +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://helloworld"
- xmlns:helloworld="http://helloworld"
- xmlns:hello="http://hello">
- <deployable composite="helloworld:helloworldws"/>
- <import namespace="http://hello"/>
- <!-- import namespace="http://hello" location="http://import-export/contrib-composite"/ -->
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl deleted file mode 100644 index 9b31363e1a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +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.
--->
-
-<wsdl:definitions targetNamespace="http://helloworld"
- xmlns:tns="http://helloworld"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:tns2="http://helloworld2"
- targetNamespace="http://helloworld"
- elementFormDefault="qualified">
-
- <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" />
-
- <element name="getGreetings" type="tns2:getGreetingsType"/>
- <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/>
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd deleted file mode 100644 index d3c83b08c6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +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.
--->
-<schema targetNamespace="http://helloworld2"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ns="http://helloworld2">
-
- <complexType name="getGreetingsType">
- <sequence>
- <element name="name" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name="getGreetingsResponseType">
- <sequence>
- <element name="getGreetingsReturn" type="string"/>
- </sequence>
- </complexType>
-</schema>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite deleted file mode 100644 index e2f852ff7e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,39 +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://helloworld"
- xmlns:helloworld="http://helloworld"
- xmlns:hello="http://hello"
- name="helloworldws">
-
- <component name="SourceHelloServiceComponent">
- <implementation.composite name="hello:hello"/>
- </component>
-
- <component name="HelloWorldServiceComponent">
- <service name="HelloWorldService">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService"/>
- </service>
- <implementation.java class="helloworld.HelloWorldImpl" />
- <reference name="helloServiceRef" target="SourceHelloServiceComponent/HelloService"/>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 1176a89143..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,126 +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 org.apache.tuscany.test.contribution;
-
-import hello.Hello;
-import helloworld.HelloWorldService;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.Socket;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-/**
- * Tests that the helloworld server is available
- */
-public class HelloWorldServerTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private Contribution helloWorldContribution;
- private Contribution compositeContribution;
-
- @Override
- protected void setUp() throws Exception {
- //Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- //Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- // File compositeContribLocation = new File("../export-composite/target/classes");
- // URL compositeContribURL = compositeContribLocation.toURL();
- URL compositeContribURL = getContributionURL(Hello.class);
- compositeContribution =
- contributionService.contribute("http://import-export/export-composite", compositeContribURL, false);
- for (Composite deployable : compositeContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
-// File helloWorldContribLocation = new File("./target/classes/");
-// URL helloWorldContribURL = helloWorldContribLocation.toURL();
- URL helloWorldContribURL = getContributionURL(HelloWorldService.class);
- helloWorldContribution =
- contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // Start Components from my composite
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getCompositeActivator().activate(deployable);
- domain.getCompositeActivator().start(deployable);
- }
- }
-
- private URL getContributionURL(Class<?> cls) throws MalformedURLException {
- String flag = "/" + cls.getName().replace('.', '/') + ".class";
- URL url = cls.getResource(flag);
- String root = url.toExternalForm();
- root = root.substring(0, root.length() - flag.length() + 1);
- if (root.startsWith("jar:") && root.endsWith("!/")) {
- root = root.substring(4, root.length() - 2);
- }
- url = new URL(root);
- return url;
- }
-
- public void testPing() throws IOException {
- new Socket("127.0.0.1", 8085);
- }
-
- public void testServiceCall() throws IOException {
- HelloWorldService helloWorldService =
- domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
- assertNotNull(helloWorldService);
-
- assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
- }
-
- @Override
- public void tearDown() throws Exception {
- ContributionService contributionService = domain.getContributionService();
-
- // Remove the contribution from the in-memory repository
- contributionService.remove("http://import-export/helloworld");
- contributionService.remove("http://import-export/export-composite");
-
- //Stop Components from my composite
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getCompositeActivator().stop(deployable);
- domain.getCompositeActivator().deactivate(deployable);
- }
-
- domain.stop();
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/pom.xml deleted file mode 100644 index 32befa7498..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/pom.xml +++ /dev/null @@ -1,73 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-java</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java Import</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-java</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +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 helloworld;
-
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldImpl implements HelloWorldService {
-
- public String getGreetings(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 224e2c4d79..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +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://helloworld"
- xmlns:helloworld="http://helloworld">
- <deployable composite="helloworld:helloworldws"/>
- <import.java package="helloworld"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite deleted file mode 100644 index 9b650e4acc..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,29 +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://helloworld"
- xmlns:helloworld="http://helloworld"
- name="helloworldws">
-
- <component name="HelloWorldServiceComponent">
- <implementation.java class="helloworld.HelloWorldImpl" />
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 431988cc04..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,127 +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 org.apache.tuscany.sca.test.contribution;
-
-import helloworld.HelloWorldImpl;
-import helloworld.HelloWorldService;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-/**
- * Tests that the helloworld server is available
- */
-public class HelloWorldServerTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private Contribution helloWorldContribution;
- private Contribution javaContribution;
-
- @Override
- protected void setUp() throws Exception {
- //Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- //Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- //File javaContribLocation = new File("../export-java/target/classes");
- //URL javaContribURL = javaContribLocation.toURL();
- URL javaContribURL = getContributionURL(HelloWorldService.class);
- javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false);
- for (Composite deployable : javaContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- //File helloWorldContribLocation = new File("./target/classes/");
- //URL helloWorldContribURL = helloWorldContribLocation.toURL();
- URL helloWorldContribURL = getContributionURL(HelloWorldImpl.class);
- helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // Start Components from my composite
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getCompositeActivator().activate(deployable);
- domain.getCompositeActivator().start(deployable);
- }
- }
-
- private URL getContributionURL(Class<?> cls) throws MalformedURLException {
- String flag = "/" + cls.getName().replace('.', '/') + ".class";
- URL url = cls.getResource(flag);
- String root = url.toExternalForm();
- root = root.substring(0, root.length() - flag.length() + 1);
- if (root.startsWith("jar:") && root.endsWith("!/")) {
- root = root.substring(4, root.length() - 2);
- }
- url = new URL(root);
- return url;
- }
-
- public void testPing() throws IOException {
- HelloWorldService helloWorldService =
- domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
- assertNotNull(helloWorldService);
- assertEquals("Hello test", helloWorldService.getGreetings("test"));
- }
-
- public void testServiceCall() throws IOException {
- HelloWorldService helloWorldService =
- domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
- assertNotNull(helloWorldService);
-
- assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
- }
-
- @Override
- public void tearDown() throws Exception {
- ContributionService contributionService = domain.getContributionService();
-
- // Remove the contribution from the in-memory repository
- contributionService.remove("http://import-export/helloworld");
- contributionService.remove("http://import-export/export-java");
-
- // Stop Components from my composite
- for (Composite deployable : helloWorldContribution.getDeployables()) {
- domain.getCompositeActivator().stop(deployable);
- domain.getCompositeActivator().deactivate(deployable);
- }
-
- domain.stop();
-
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/pom.xml deleted file mode 100644 index 214231ba18..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/pom.xml +++ /dev/null @@ -1,102 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-resource</artifactId> - <name>Apache Tuscany SCA iTest Contribution Resource Import</name> - -<dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-resource</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-http</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.5.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-resource</artifactId> - <version>1.5.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index ac6d7becb3..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +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://store" - xmlns:store="http://store"> - <deployable composite="store:store"/> - <import.resource uri="ufservices/store.html"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/store.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/store.composite deleted file mode 100644 index bb5a7b764f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/main/resources/store.composite +++ /dev/null @@ -1,33 +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" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://store" - xmlns:helloworld="http://store" - name="store"> - - <component name="store"> - <tuscany:implementation.resource location="ufservices/store.html"/> - <service name="Resource"> - <tuscany:binding.http uri="http://127.0.0.1:8085"/> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java deleted file mode 100644 index 1b7542b7d9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java +++ /dev/null @@ -1,129 +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 org.apache.tuscany.sca.test.contribution; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class StoreTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution storeContribution; - private Contribution resourceContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL javaContribURL = getContributionURL(cl, "ufservices/store.html"); - resourceContribution = contributionService.contribute("http://import-export/export-resource", javaContribURL, false); - for (Composite deployable : resourceContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - URL storeContributionURL = getContributionURL(cl, "store.composite"); - - storeContribution = - contributionService.contribute("http://import-export/store", storeContributionURL, false); - for (Composite deployable : storeContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/store"); - contributionService.remove("http://import-export/export-resource"); - - // Stop Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - - - /** - * Utility methods - */ - - - private URL getContributionURL(ClassLoader cl, Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cl.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - private URL getContributionURL(ClassLoader cl, String uri) throws MalformedURLException { - URL url = cl.getResource(uri); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - uri.length()); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/pom.xml deleted file mode 100644 index 9b60834e53..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/pom.xml +++ /dev/null @@ -1,73 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-wsdl</artifactId> - <name>Apache Tuscany SCA iTest Contribution WSDL Import</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-wsdl</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +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 helloworld;
-
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldImpl implements HelloWorldService {
-
- public String getGreetings(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 3d43290380..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +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 helloworld;
-
-import java.io.IOException;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This server program shows how to create an SCA runtime, and start it which
- * activates the helloworld Web service endpoint.
- */
-public class HelloWorldServer {
-
- public static void main(String[] args) {
-
- SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite");
-
- try {
- System.out.println("HelloWorld server started (press enter to shutdown)");
- System.in.read();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- scaDomain.close();
- System.out.println("HelloWorld server stopped");
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 74d22ed830..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d46fe0b57c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +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://helloworld"
- xmlns:helloworld="http://helloworld">
- <deployable composite="helloworld:helloworldws"/>
- <import namespace="http://helloworld" location="http://import-export/export-wsdl"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite deleted file mode 100644 index 5008a2ea5b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,33 +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://helloworld"
- xmlns:hw="http://helloworld"
- name="helloworldws">
-
- <component name="HelloWorldServiceComponent">
- <service name="HelloWorldService">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService"/>
- </service>
- <implementation.java class="helloworld.HelloWorldImpl" />
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 5c40606e50..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,137 +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 org.apache.tuscany.sca.test.contribution;
-
-import helloworld.HelloWorldService;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.Socket;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-/**
- * Tests that the helloworld server is available
- */
-public class HelloWorldServerTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private Contribution wsdlContribution;
- private Contribution consumerContribution;
-
- @Override
- protected void setUp() throws Exception {
- // Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- //Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- // File wsdlContribLocation = new File("../export-wsdl/target/classes");
- // URL wsdlContribURL = wsdlContribLocation.toURL();
- URL wsdlContribURL = getContributionURL(getClass().getClassLoader(), "helloworld.wsdl");
- wsdlContribution = contributionService.contribute("http://import-export/export-wsdl", wsdlContribURL, false);
- for (Composite deployable : wsdlContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // File helloWorldContribLocation = new File("./target/classes/");
- // URL helloWorldContribURL = helloWorldContribLocation.toURL();
- URL helloWorldContribURL = getContributionURL(HelloWorldService.class);
- consumerContribution =
- contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
- for (Composite deployable : consumerContribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // Start Components from my composite
- for (Composite deployable : consumerContribution.getDeployables()) {
- domain.getCompositeActivator().activate(deployable);
- domain.getCompositeActivator().start(deployable);
- }
- }
-
- public void testPing() throws IOException {
- new Socket("127.0.0.1", 8085);
- }
-
- private URL getContributionURL(Class<?> cls) throws MalformedURLException {
- String flag = "/" + cls.getName().replace('.', '/') + ".class";
- URL url = cls.getResource(flag);
- String root = url.toExternalForm();
- root = root.substring(0, root.length() - flag.length() + 1);
- if (root.startsWith("jar:") && root.endsWith("!/")) {
- root = root.substring(4, root.length() - 2);
- }
- url = new URL(root);
- return url;
- }
-
- private URL getContributionURL(ClassLoader cl, String flag) throws MalformedURLException {
- URL url = cl.getResource(flag);
- String root = url.toExternalForm();
- root = root.substring(0, root.length() - flag.length());
- if (root.startsWith("jar:") && root.endsWith("!/")) {
- root = root.substring(4, root.length() - 2);
- }
- url = new URL(root);
- // System.out.println(url);
- return url;
- }
-
- public void testServiceCall() throws IOException {
- HelloWorldService helloWorldService =
- domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
- assertNotNull(helloWorldService);
-
- assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
- }
-
- @Override
- public void tearDown() throws Exception {
- ContributionService contributionService = domain.getContributionService();
-
- // Remove the contribution from the in-memory repository
- contributionService.remove("http://import-export/helloworld");
- contributionService.remove("http://import-export/export-wsdl");
-
- // Stop Components from my composite
- for (Composite deployable : consumerContribution.getDeployables()) {
- domain.getCompositeActivator().stop(deployable);
- domain.getCompositeActivator().deactivate(deployable);
- }
-
- domain.stop();
-
- domain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/pom.xml deleted file mode 100644 index 76fedfafc0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-import-export/pom.xml +++ /dev/null @@ -1,56 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-export</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Contribution Import/Export Integration Tests</name> - - <modules> - <module>export-composite</module> - <module>export-java</module> - <module>export-resource</module> - <module>export-wsdl</module> - <module>import-composite</module> - <module>import-java</module> - <module>import-resource</module> - <module>import-wsdl</module> - </modules> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml deleted file mode 100644 index 123c776499..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml +++ /dev/null @@ -1,103 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 30</name> - <packaging>ear</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-00-jar-shared</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>ejb</type> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>war</type> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - <modules> - <jarModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-00-jar-shared</artifactId> - <includeInApplicationXml>true</includeInApplicationXml> - <bundleDir>/</bundleDir> - </jarModule> - <ejbModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <bundleDir>/</bundleDir> - </ejbModule> - <webModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <bundleDir>/</bundleDir> - </webModule> - </modules> - </configuration> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite deleted file mode 100644 index 3b1555f567..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite +++ /dev/null @@ -1,48 +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="Calculator"> - - <component name="HelloworldServiceComponent"> - <implementation.ejb ejb-link="itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit.jar#HelloworldServiceBean"/> - <service name="HelloworldService8"> - <interface.java interface="sample.ejb3.HelloworldService8"/> - <binding.sca/> - </service> - <reference name="hwReference" target="HelloworldServiceJavaComponent"/> - <property name="hwProperty">EJB</property> - </component> - - <service name="TheService" promote="HelloworldServiceComponent/HelloworldService8"/> - - <reference name="TheReference" promote="HelloworldServiceComponent/hwReference"/> - - <component name="HelloworldServiceJavaComponent"> - <implementation.java class="sample.java.HelloworldServiceJavaImpl"/> - <property name="hwProperty">Java</property> - </component> - - <service name="JavaService" promote="HelloworldServiceJavaComponent/HelloworldServiceJava"/> - - <reference name="JavaReference" promote="HelloworldServiceJavaComponent/hwReference"/> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml deleted file mode 100644 index fe71740c9c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml +++ /dev/null @@ -1,103 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 29</name> - <packaging>ear</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-00-jar-shared</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-08-ejb-enhanced</artifactId> - <version>1.5.1</version> - <type>ejb</type> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <version>1.5.1</version> - <type>war</type> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - <modules> - <jarModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-00-jar-shared</artifactId> - <includeInApplicationXml>true</includeInApplicationXml> - <bundleDir>/</bundleDir> - </jarModule> - <ejbModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-08-ejb-enhanced</artifactId> - <bundleDir>/</bundleDir> - </ejbModule> - <webModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <bundleDir>/</bundleDir> - </webModule> - </modules> - </configuration> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite deleted file mode 100644 index b131d375b0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite +++ /dev/null @@ -1,62 +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="Calculator"> - - <component name="HelloworldServiceComponent"> - <implementation.ejb ejb-link="itest-contribution-jee-samples-08-ejb-enhanced.jar#HelloworldService8Bean"/> - <service name="HelloworldService8"> - <interface.java interface="sample.ejb3.HelloworldService8"/> - <binding.sca/> - </service> - <reference name="hwReference" target="HelloworldServiceJavaComponent"/> - <property name="hwProperty">EJB</property> - </component> - - <component name="HelloworldServiceComponent2"> - <implementation.ejb ejb-link="itest-contribution-jee-samples-08-ejb-enhanced.jar#HelloworldService8Bean"/> - <service name="HelloworldService8"> - <interface.java interface="sample.ejb3.HelloworldService8"/> - <binding.sca/> - </service> - <reference name="hwReference" target="HelloworldServiceJavaComponent"/> - <property name="hwProperty">EJB</property> - </component> - - <service name="TheService" promote="HelloworldServiceComponent/HelloworldService8"/> - - <reference name="TheReference" promote="HelloworldServiceComponent/hwReference"/> - - <service name="TheService2" promote="HelloworldServiceComponent2/HelloworldService8"/> - - <reference name="TheReference2" promote="HelloworldServiceComponent2/hwReference"/> - - <component name="HelloworldServiceJavaComponent"> - <implementation.java class="sample.java.HelloworldServiceJavaImpl"/> - <property name="hwProperty">Java</property> - </component> - - <service name="JavaService" promote="HelloworldServiceJavaComponent/HelloworldServiceJava"/> - - <reference name="JavaReference" promote="HelloworldServiceJavaComponent/hwReference"/> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite deleted file mode 100644 index 90872041b0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite +++ /dev/null @@ -1,49 +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="Calculator"> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-nonenhanced/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-nonenhanced/pom.xml deleted file mode 100644 index 94795ab129..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ear-nonenhanced/pom.xml +++ /dev/null @@ -1,90 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-13-ear-nonenhanced</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 13</name> - <packaging>ear</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-07-ejb-nonenhanced</artifactId> - <version>1.5.1</version> - <type>ejb</type> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <version>1.5.1</version> - <type>war</type> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - <modules> - <ejbModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-07-ejb-nonenhanced</artifactId> - <bundleDir>/</bundleDir> - </ejbModule> - <webModule> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <bundleDir>/</bundleDir> - </webModule> - </modules> - </configuration> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/pom.xml deleted file mode 100644 index e7f7422a7d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/pom.xml +++ /dev/null @@ -1,68 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 12</name> - <packaging>ejb</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-annotation_1.0_spec</artifactId> - <version>1.1.1</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ejb-plugin</artifactId> - <configuration> - <ejbVersion>3.0</ejbVersion> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldServiceBean.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldServiceBean.java deleted file mode 100644 index ad9003dc67..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldServiceBean.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 sample.ejb3; - -import javax.ejb.Stateless; - -import org.osoa.sca.annotations.Reference; - -/** - * HelloworldService EJB implementation with no SCA enhancement - - */ -@Stateless -public class HelloworldServiceBean implements HelloworldService { - - @Reference - protected HelloworldService nextService; - - public String getGreetings(String name) { - String greeting = "Hello " + name; - System.out.println(greeting); - return greeting; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/ejb-jar.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/ejb-jar.composite deleted file mode 100644 index bcaa154913..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/ejb-jar.composite +++ /dev/null @@ -1,35 +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="Calculator"> - - <component name="HelloworldServiceComponent"> - <implementation.ejb ejb-link="HelloworldServiceBean"/> - <service name="HelloworldService"> - <interface.java interface="sample.ejb3.HelloworldService"/> - <binding.sca/> - </service> - </component> - - <service name="TheService" promote="HelloworldServiceComponent/HelloworldService"/> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml deleted file mode 100644 index 9a97cbd535..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml +++ /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"src/main/resources/META-INF/application.xml" - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<ejb:openejb-jar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"> - <dep:environment> - <dep:moduleId> - <dep:groupId>test</dep:groupId> - <dep:artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</dep:artifactId> - <dep:version>1.0</dep:version> - <dep:type>jar</dep:type> - </dep:moduleId> - <dep:dependencies/> - <dep:hidden-classes/> - <dep:non-overridable-classes/> - </dep:environment> -</ejb:openejb-jar> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/pom.xml deleted file mode 100644 index 10aa2d8127..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/pom.xml +++ /dev/null @@ -1,68 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-08-ejb-enhanced</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 08</name> - <packaging>ejb</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-annotation_1.0_spec</artifactId> - <version>1.1.1</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ejb-plugin</artifactId> - <configuration> - <ejbVersion>3.0</ejbVersion> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldLocal8.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldLocal8.java deleted file mode 100644 index b5224a2319..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldLocal8.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Local; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Local -public interface HelloworldLocal8 { - String getGreetingsLocal(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8.java deleted file mode 100644 index e5e9fe6a82..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService8 { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java deleted file mode 100644 index a6d7f2dd04..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.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 sample.ejb3; - -import javax.ejb.Stateless; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -/** - * HelloworldService EJB implementation SCA enhancement - - */ -@Stateless -public class HelloworldService8Bean implements HelloworldService8, HelloworldLocal8 { - - @Reference - protected HelloworldService8 hwReference; - - @Property - protected String hwProperty; - - public String getGreetings(String name) { - String greeting = "Hello remote " + name; - System.out.println(greeting); - return greeting; - } - - public String getGreetingsLocal(String name) { - String greeting = "Hello local " + name; - System.out.println(greeting); - return greeting; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/META-INF/openejb-jar.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/META-INF/openejb-jar.xml deleted file mode 100644 index db36c4b140..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/META-INF/openejb-jar.xml +++ /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"src/main/resources/META-INF/application.xml" - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<ejb:openejb-jar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"> - <dep:environment> - <dep:moduleId> - <dep:groupId>test</dep:groupId> - <dep:artifactId>itest-contribution-jee-samples-08-ejb-enhanced</dep:artifactId> - <dep:version>1.0</dep:version> - <dep:type>jar</dep:type> - </dep:moduleId> - <dep:dependencies/> - <dep:hidden-classes/> - <dep:non-overridable-classes/> - </dep:environment> -</ejb:openejb-jar> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite deleted file mode 100644 index 90872041b0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite +++ /dev/null @@ -1,49 +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="Calculator"> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml deleted file mode 100644 index 506652388d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml +++ /dev/null @@ -1,68 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-07-ejb-nonenhanced</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 07</name> - <packaging>ejb</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-annotation_1.0_spec</artifactId> - <version>1.1.1</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ejb-plugin</artifactId> - <configuration> - <ejbVersion>3.0</ejbVersion> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldLocal7.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldLocal7.java deleted file mode 100644 index 4df5cd37de..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldLocal7.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Local; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Local -public interface HelloworldLocal7 { - String getGreetingsLocal(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7.java deleted file mode 100644 index 41ecddb62e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService7 { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7Bean.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7Bean.java deleted file mode 100644 index 403ead623c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7Bean.java +++ /dev/null @@ -1,41 +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 sample.ejb3; - -import javax.ejb.Stateless; - -/** - * HelloworldService EJB implementation with no SCA enhancement - - */ -@Stateless -public class HelloworldService7Bean implements HelloworldService7, HelloworldLocal7 { - - public String getGreetings(String name) { - String greeting = "Hello remote " + name; - System.out.println(greeting); - return greeting; - } - - public String getGreetingsLocal(String name) { - String greeting = "Hello local " + name; - System.out.println(greeting); - return greeting; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7aBean.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7aBean.java deleted file mode 100644 index 97242bff96..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/java/sample/ejb3/HelloworldService7aBean.java +++ /dev/null @@ -1,41 +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 sample.ejb3; - -import javax.ejb.Stateless; - -/** - * Another HelloworldService EJB implementation with no SCA enhancement - * A test for TUSCANY-3198 - */ -@Stateless -public class HelloworldService7aBean implements HelloworldService7, HelloworldLocal7 { - - public String getGreetings(String name) { - String greeting = "Hello remote " + name; - System.out.println(greeting); - return greeting; - } - - public String getGreetingsLocal(String name) { - String greeting = "Hello local " + name; - System.out.println(greeting); - return greeting; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml deleted file mode 100644 index 7428735903..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml +++ /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"src/main/resources/META-INF/application.xml" - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<ejb:openejb-jar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"> - <dep:environment> - <dep:moduleId> - <dep:groupId>test</dep:groupId> - <dep:artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</dep:artifactId> - <dep:version>1.0</dep:version> - <dep:type>jar</dep:type> - </dep:moduleId> - <dep:dependencies/> - <dep:hidden-classes/> - <dep:non-overridable-classes/> - </dep:environment> -</ejb:openejb-jar> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/pom.xml deleted file mode 100644 index 0e7836ceb1..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/pom.xml +++ /dev/null @@ -1,72 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-00-jar-shared</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 00</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-annotation_1.0_spec</artifactId> - <version>1.1.1</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.2</version> - <configuration> - <archive> - <manifest> - <mainClass>sample.java.JarMain</mainClass> - </manifest> - </archive> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJava.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJava.java deleted file mode 100644 index 5a08769550..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJava.java +++ /dev/null @@ -1,33 +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 sample.java; - -import org.osoa.sca.annotations.Remotable; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remotable -public interface HelloworldServiceJava { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java deleted file mode 100644 index 265af5b3a0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java +++ /dev/null @@ -1,36 +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 sample.java; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -public class HelloworldServiceJavaImpl implements HelloworldServiceJava { - - @Reference - protected HelloworldServiceJava hwReference; - - @Property - protected String hwProperty; - - public String getGreetings(String name) { - String greeting = hwReference.getGreetings(name) + " " + hwProperty; - System.out.println(greeting); - return greeting; - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/JarMain.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/JarMain.java deleted file mode 100644 index 81793e47e6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/JarMain.java +++ /dev/null @@ -1,24 +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 sample.java; - -public class JarMain { - - public static void main(String[] args) { - System.out.println("JarMain called"); - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/pom.xml deleted file mode 100644 index 6ab28e497d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/pom.xml +++ /dev/null @@ -1,59 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples</name> - - <packaging>pom</packaging> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>jar-shared</module> - <module>war-nonenhanced</module> - <module>war-appcomp-contrib-implicit</module> - <module>ejb-nonenhanced</module> - <module>ejb-enhanced</module> - <module>ejb-appcomp-contrib-implicit</module> - <module>ear-nonenhanced</module> - <module>ear-appcomp-contrib-implicit</module> - <module>ear-appcomp-contrib-implicit-war-appcomp</module> - <module>scajar-ear-nonenhanced</module> - <module>scajar-ear-appcomp</module> - <module>scajar-ear-appcomp-war-appcomp</module> - <module>scazip-ejb-appcomp</module> - <module>scazip-war-appcomp</module> - </modules> - </profile> - </profiles> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml deleted file mode 100644 index 302a758784..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml +++ /dev/null @@ -1,72 +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.5.1</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee-samples-43-scajar-ear-appcomp-war-appcomp</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 43</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-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java deleted file mode 100644 index 1fad282a75..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.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 sample.java; - -import org.osoa.sca.annotations.Remotable; - - -@Remotable -public interface HelloworldServiceJava { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java deleted file mode 100644 index 8adb6a5995..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java +++ /dev/null @@ -1,25 +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 sample.pojo; - -public interface HelloworldClient2 { - - String getGreetings(String name); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java deleted file mode 100644 index ae16263505..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java +++ /dev/null @@ -1,39 +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 sample.pojo; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; -import sample.java.HelloworldServiceJava; - -public class HelloworldClient2Impl implements HelloworldClient2 { - - @Reference - protected HelloworldService hwService; - - @Reference - protected HelloworldServiceJava hwJavaService; - - public String getGreetings(String name){ - //return hwService.getGreetings(name) + hwJavaService.getGreetings(name); - return hwJavaService.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java deleted file mode 100644 index 05885cead7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java +++ /dev/null @@ -1,29 +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 sample.pojo; - -import sample.java.HelloworldServiceJava; - -public class HelloworldTargetImpl implements HelloworldServiceJava { - - public String getGreetings(String name){ - return "Hello " + name; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite deleted file mode 100644 index e9346fb2bb..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite +++ /dev/null @@ -1,40 +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="Calculator"> - - <component name="HelloworldClientComponent"> - <implementation.java class="sample.pojo.HelloworldClient2Impl"/> - <reference name="hwService" target="HelloworldServiceComponent/TheService" /> - <reference name="hwJavaService" target="HelloworldServiceComponent/JavaService" /> - </component> - - <component name="HelloworldServiceComponent"> - <implementation.jee archive="itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp.ear"/> - <reference name="JavaReference" target="HelloworldTargetComponent"/> - </component> - - <component name="HelloworldTargetComponent"> - <implementation.java class="sample.pojo.HelloworldTargetImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml deleted file mode 100644 index 718a745068..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml +++ /dev/null @@ -1,72 +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.5.1</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee-samples-41-scajar-ear-appcomp</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 41</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-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/java/HelloworldServiceJava.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/java/HelloworldServiceJava.java deleted file mode 100644 index 1fad282a75..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/java/HelloworldServiceJava.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 sample.java; - -import org.osoa.sca.annotations.Remotable; - - -@Remotable -public interface HelloworldServiceJava { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2.java deleted file mode 100644 index 8adb6a5995..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2.java +++ /dev/null @@ -1,25 +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 sample.pojo; - -public interface HelloworldClient2 { - - String getGreetings(String name); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java deleted file mode 100644 index ae16263505..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java +++ /dev/null @@ -1,39 +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 sample.pojo; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; -import sample.java.HelloworldServiceJava; - -public class HelloworldClient2Impl implements HelloworldClient2 { - - @Reference - protected HelloworldService hwService; - - @Reference - protected HelloworldServiceJava hwJavaService; - - public String getGreetings(String name){ - //return hwService.getGreetings(name) + hwJavaService.getGreetings(name); - return hwJavaService.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java deleted file mode 100644 index 05885cead7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java +++ /dev/null @@ -1,29 +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 sample.pojo; - -import sample.java.HelloworldServiceJava; - -public class HelloworldTargetImpl implements HelloworldServiceJava { - - public String getGreetings(String name){ - return "Hello " + name; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite deleted file mode 100644 index ebd8377725..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite +++ /dev/null @@ -1,40 +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="Calculator"> - - <component name="HelloworldClientComponent"> - <implementation.java class="sample.pojo.HelloworldClient2Impl"/> - <reference name="hwService" target="HelloworldServiceComponent/TheService" /> - <reference name="hwJavaService" target="HelloworldServiceComponent/JavaService" /> - </component> - - <component name="HelloworldServiceComponent"> - <implementation.jee archive="itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear"/> - <reference name="JavaReference" target="HelloworldTargetComponent"/> - </component> - - <component name="HelloworldTargetComponent"> - <implementation.java class="sample.pojo.HelloworldTargetImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml deleted file mode 100644 index c29d0c58ce..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml +++ /dev/null @@ -1,72 +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.5.1</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee-samples-35-scajar-ear-nonenhanced</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 35</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-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java deleted file mode 100644 index 6f37c9b272..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java +++ /dev/null @@ -1,25 +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 sample.pojo; - -public interface HelloworldClient { - - String getGreetings(String name); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java deleted file mode 100644 index a38c4a773f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java +++ /dev/null @@ -1,34 +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 sample.pojo; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; - -public class HelloworldClientImpl implements HelloworldClient { - - @Reference - protected HelloworldService hwService; - - public String getGreetings(String name){ - return hwService.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite deleted file mode 100644 index 79c9dd3243..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite +++ /dev/null @@ -1,34 +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="Calculator"> - - <component name="HelloworlClientComponent"> - <implementation.java class="sample.pojo.HelloworldClientImpl"/> - <reference name="hwService" target="HelloworldServiceComponent/HelloworldService7Bean_HelloworldService7" /> - </component> - - <component name="HelloworldServiceComponent"> - <implementation.jee archive="itest-contribution-jee-samples-13-ear-nonenhanced.ear"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/build.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/build.xml deleted file mode 100644 index bdbe79a46d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/build.xml +++ /dev/null @@ -1,24 +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. ---> -<project name="copy-jar-to-zip" default="copy"> - <target name="copy"> - <copy file="${from.file}" - toFile="${to.file}"/> - </target> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/pom.xml deleted file mode 100644 index 67241cc12e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/pom.xml +++ /dev/null @@ -1,135 +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.5.1</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee-samples-10-scazip-ejb-appcomp</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 10</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-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>ejb</type> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <version>${project.version}</version> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/classes</outputDirectory> - </artifactItem> - </artifactItems> - <stripVersion>true</stripVersion> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.3</version> - - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>copy-jar-to-zip</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="from.file" value="target/${artifactId}.jar"/> - <property name="to.file" value="target/${artifactId}.zip"/> - <ant antfile="./build.xml" /> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClient.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClient.java deleted file mode 100644 index 6f37c9b272..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClient.java +++ /dev/null @@ -1,25 +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 sample.pojo; - -public interface HelloworldClient { - - String getGreetings(String name); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java deleted file mode 100644 index a38c4a773f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java +++ /dev/null @@ -1,34 +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 sample.pojo; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; - -public class HelloworldClientImpl implements HelloworldClient { - - @Reference - protected HelloworldService hwService; - - public String getGreetings(String name){ - return hwService.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/resources/helloworld.composite deleted file mode 100644 index 909b8a1484..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-ejb-appcomp/src/main/resources/helloworld.composite +++ /dev/null @@ -1,34 +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="Calculator"> - - <component name="HelloworlClientComponent"> - <implementation.java class="sample.pojo.HelloworldClientImpl"/> - <reference name="hwService" target="HelloworldServiceComponent/HelloworldServiceBean_HelloworldService" /> - </component> - - <component name="HelloworldServiceComponent"> - <implementation.jee archive="itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit.jar"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/build.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/build.xml deleted file mode 100644 index bdbe79a46d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/build.xml +++ /dev/null @@ -1,24 +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. ---> -<project name="copy-jar-to-zip" default="copy"> - <target name="copy"> - <copy file="${from.file}" - toFile="${to.file}"/> - </target> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/pom.xml deleted file mode 100644 index f88d68876d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/pom.xml +++ /dev/null @@ -1,136 +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.5.1</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee-samples-04-scazip-war-appcomp</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 04</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-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <version>${project.version}</version> - <type>war</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/classes</outputDirectory> - </artifactItem> - </artifactItems> - <stripVersion>true</stripVersion> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.3</version> - - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>copy-jar-to-zip</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="from.file" value="target/${artifactId}.jar"/> - <property name="to.file" value="target/${artifactId}.zip"/> - <ant antfile="./build.xml" /> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClient.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClient.java deleted file mode 100644 index 6f37c9b272..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClient.java +++ /dev/null @@ -1,25 +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 sample.pojo; - -public interface HelloworldClient { - - String getGreetings(String name); - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java deleted file mode 100644 index a38c4a773f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java +++ /dev/null @@ -1,34 +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 sample.pojo; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; - -public class HelloworldClientImpl implements HelloworldClient { - - @Reference - protected HelloworldService hwService; - - public String getGreetings(String name){ - return hwService.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/resources/helloworld.composite deleted file mode 100644 index eaa567595e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/scazip-war-appcomp/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +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="Calculator"> - - <component name="HelloworldServiceComponent"> - <implementation.jee archive="itest-contribution-jee-samples-6-war-appcomp-contrib-implicit.jar"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/pom.xml deleted file mode 100644 index f5295b7388..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/pom.xml +++ /dev/null @@ -1,66 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 06</name> - <packaging>war</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/HelloworldEjbServlet.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/HelloworldEjbServlet.java deleted file mode 100644 index ae8613f8db..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/HelloworldEjbServlet.java +++ /dev/null @@ -1,66 +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 sample; - -import java.io.IOException; -import java.io.Writer; - -import javax.ejb.EJB; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; - -/** - * A servlet that invokes HelloworldService which is an SCA enhanced stateless EJB. - * - * @version $Rev$ $Date$ - */ -public class HelloworldEjbServlet extends HttpServlet { - private static final long serialVersionUID = -4448818871934180718L; - - @EJB - private HelloworldService service; - - @Reference - protected HelloworldService helloworldSca; - - @Override - protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String name = request.getParameter("name"); - String greeting = service.getGreetings(name); - String greeting2 = helloworldSca.getGreetings(name.toUpperCase()); - - Writer out = response.getWriter(); - out.write("<html><head><title>Apache Tuscany Helloworld Web Sample</title></head><body>"); - out.write("<h2>Apache Tuscany Helloworld Web Sample</h2>"); - out.write("This page displays the response got from HelloworldServiceBean, which is a Stateless EJB."); - out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name); - out.write(greeting); - out.write("The following is got by invoking the HelloworldService SCA service provided by the HelloworldServiceBean"); - out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name.toUpperCase()); - out.write(greeting2); - out.write("</body></html>"); - out.flush(); - out.close(); - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/geronimo-web.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 2563c8b7c8..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - * 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. ---> -<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"> - <environment> - <moduleId> - <groupId>test</groupId> - <artifactId>helloworld-web</artifactId> - <version>1.0</version> - <type>car</type> - </moduleId> - <dependencies> - <dependency> - <groupId>test</groupId> - <artifactId>helloworld-ejb</artifactId> - <version>1.0</version> - <type>jar</type> - </dependency> - </dependencies> - <hidden-classes /> - <non-overridable-classes /> - </environment> - <context-root>helloworld-web</context-root> - <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"> - <nam:ref-name>ejb/HelloworldServiceBean</nam:ref-name> - <nam:pattern> - <nam:groupId>test</nam:groupId> - <nam:artifactId>helloworld-ejb</nam:artifactId> - <nam:version>1.0</nam:version> - <nam:name>HelloworldServiceBean</nam:name> - </nam:pattern> - </nam:ejb-ref> -</web-app>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 823085e81f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,36 +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:xsd="http://www.w3.org/2001/XMLSchema" - name="Helloworld-web"> - - <component name="HelloworldWebComponent"> - <implementation.java class="sample.HelloworldEjbServlet"/> - <reference name="helloworldSca"> - <interface.java interface="sample.ejb3.HelloworldService"/> - <binding.sca uri="http://localhost:8080/SomeService"/> - </reference> - </component> - - <reference name="helloworldSca" promote="HelloworldWebComponent/helloworldSca"/> - -</composite> - diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 628588a974..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - * 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. ---> - -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web -Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> -<web-app> - - <display-name>Helloworld Web Sample</display-name> - - <servlet> - <servlet-name>HelloworldEjbServlet</servlet-name> - <servlet-class>sample.HelloworldEjbServlet</servlet-class> - </servlet> - - <servlet-mapping> - <servlet-name>HelloworldEjbServlet</servlet-name> - <url-pattern>/HelloworldEjbServlet</url-pattern> - </servlet-mapping> - - <welcome-file-list id="WelcomeFileList"> - <welcome-file>hello.html</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/hello.html b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/hello.html deleted file mode 100644 index 69473543c9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-appcomp-contrib-implicit/src/main/webapp/hello.html +++ /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. ---> -<html> - -<head> -<title>Apache Tuscany Helloworld Web Sample</title> -</head> - -<body> - -<h2>Apache Tuscany Helloworld Web Sample</h2> - -This web page posts the data to <b>HelloworldEjbServlet</b>. The servlet invokes <b>HelloworldServiceBean</b>, which is a Stateless EJB. -The EJB in turn invokes <b>Helloworld</b> SCA service through proxies injected into EJB fields. - -<br/><br/> - -<form action="HelloworldEjbServlet" method="post"> - <table> - <tr> - <td>Enter your name:</td> - <td> - <input type="text" name="name" width="10"> - </td> - </tr> - <tr> - <td align="left" colspan="2"> - <button name="submit" type="submit">getGreeting</button> - </td> - </tr> - </table> -</form> -</body> -</html> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/pom.xml deleted file mode 100644 index aa14813a14..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/pom.xml +++ /dev/null @@ -1,66 +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>itest-contribution-jee-samples</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE Samples 01</name> - <packaging>war</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.5.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ejb_3.0_spec</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java deleted file mode 100644 index 71055bbdfe..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java +++ /dev/null @@ -1,63 +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 sample; - -import java.io.IOException; -import java.io.Writer; - -import javax.ejb.EJB; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.osoa.sca.annotations.Reference; - -import sample.ejb3.HelloworldService; - -/** - * A servlet that invokes HelloworldService which is an SCA enhanced stateless EJB. - * - * @version $Rev$ $Date$ - */ -public class HelloworldEjbServlet extends HttpServlet { - private static final long serialVersionUID = -4448818871934180718L; - - @EJB - private HelloworldService service; - - @Override - protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String name = request.getParameter("name"); - String greeting = service.getGreetings(name); - //String greeting2 = helloworldSca.getGreetings(name.toUpperCase()); - - Writer out = response.getWriter(); - out.write("<html><head><title>Apache Tuscany Helloworld Web Sample</title></head><body>"); - out.write("<h2>Apache Tuscany Helloworld Web Sample</h2>"); - out.write("This page displays the response got from HelloworldServiceBean, which is a Stateless EJB."); - out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name); - out.write(greeting); - out.write("The following is got by invoking the HelloworldService SCA service provided by the HelloworldServiceBean"); - out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name.toUpperCase()); - //out.write(greeting2); - out.write("</body></html>"); - out.flush(); - out.close(); - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java deleted file mode 100644 index 0194d1870c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java +++ /dev/null @@ -1,33 +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 sample.ejb3; - -import javax.ejb.Remote; - -/** - * HelloworldService EJB interface. - * - * @version $Rev$ $Date$ - */ - -@Remote -public interface HelloworldService { - String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/geronimo-web.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 2563c8b7c8..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - * 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. ---> -<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"> - <environment> - <moduleId> - <groupId>test</groupId> - <artifactId>helloworld-web</artifactId> - <version>1.0</version> - <type>car</type> - </moduleId> - <dependencies> - <dependency> - <groupId>test</groupId> - <artifactId>helloworld-ejb</artifactId> - <version>1.0</version> - <type>jar</type> - </dependency> - </dependencies> - <hidden-classes /> - <non-overridable-classes /> - </environment> - <context-root>helloworld-web</context-root> - <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"> - <nam:ref-name>ejb/HelloworldServiceBean</nam:ref-name> - <nam:pattern> - <nam:groupId>test</nam:groupId> - <nam:artifactId>helloworld-ejb</nam:artifactId> - <nam:version>1.0</nam:version> - <nam:name>HelloworldServiceBean</nam:name> - </nam:pattern> - </nam:ejb-ref> -</web-app>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 628588a974..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - * 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. ---> - -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web -Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> -<web-app> - - <display-name>Helloworld Web Sample</display-name> - - <servlet> - <servlet-name>HelloworldEjbServlet</servlet-name> - <servlet-class>sample.HelloworldEjbServlet</servlet-class> - </servlet> - - <servlet-mapping> - <servlet-name>HelloworldEjbServlet</servlet-name> - <url-pattern>/HelloworldEjbServlet</url-pattern> - </servlet-mapping> - - <welcome-file-list id="WelcomeFileList"> - <welcome-file>hello.html</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/hello.html b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/hello.html deleted file mode 100644 index 69473543c9..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee-samples/war-nonenhanced/src/main/webapp/hello.html +++ /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. ---> -<html> - -<head> -<title>Apache Tuscany Helloworld Web Sample</title> -</head> - -<body> - -<h2>Apache Tuscany Helloworld Web Sample</h2> - -This web page posts the data to <b>HelloworldEjbServlet</b>. The servlet invokes <b>HelloworldServiceBean</b>, which is a Stateless EJB. -The EJB in turn invokes <b>Helloworld</b> SCA service through proxies injected into EJB fields. - -<br/><br/> - -<form action="HelloworldEjbServlet" method="post"> - <table> - <tr> - <td>Enter your name:</td> - <td> - <input type="text" name="name" width="10"> - </td> - </tr> - <tr> - <td align="left" colspan="2"> - <button name="submit" type="submit">getGreeting</button> - </td> - </tr> - </table> -</form> -</body> -</html> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/pom.xml deleted file mode 100644 index 7f245e2da5..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/pom.xml +++ /dev/null @@ -1,183 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-jee</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java EE</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-jee-impl</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-webapp</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-ejb</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-jee</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-web-runtime</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.myfaces.core</groupId> - <artifactId>myfaces-api</artifactId> - <version>1.2.3</version> - </dependency> - - <dependency> - <groupId>org.apache.myfaces.core</groupId> - <artifactId>myfaces-impl</artifactId> - <version>1.2.3</version> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jsp_2.1_spec</artifactId> - <version>1.0.1</version> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-el_1.0_spec</artifactId> - <version>1.0.1</version> - </dependency> - - <!-- the sample war, jar and ear files that are used to test JEE contribution processing --> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-01-war-nonenhanced</artifactId> - <version>1.5.1</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-06-war-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-07-ejb-nonenhanced</artifactId> - <version>1.5.1</version> - <type>ejb</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-08-ejb-enhanced</artifactId> - <version>1.5.1</version> - <type>ejb</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>ejb</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-13-ear-nonenhanced</artifactId> - <version>1.5.1</version> - <type>ear</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit</artifactId> - <version>1.5.1</version> - <type>ear</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-35-scajar-ear-nonenhanced</artifactId> - <version>1.5.1</version> - <type>jar</type> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-jee-samples-41-scajar-ear-appcomp</artifactId> - <version>1.5.1</version> - <type>jar</type> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProvider.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProvider.java deleted file mode 100644 index e7e1d90797..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProvider.java +++ /dev/null @@ -1,48 +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 org.apache.tuscany.sca.test.contribution.jee; - -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - - -class TestEJBImplementationProvider implements ImplementationProvider { - - TestEJBImplementationProvider(RuntimeComponent component, EJBImplementation ejbImplementation) { - } - - public Invoker createInvoker(RuntimeComponentService service, Operation operation) { - return null; - } - - public boolean supportsOneWayInvocation() { - return false; - } - - public void start() { - } - - public void stop() { - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProviderFactory.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProviderFactory.java deleted file mode 100644 index 4660fee7fd..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestEJBImplementationProviderFactory.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.test.contribution.jee; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.provider.ImplementationProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -/** - * A factory for resource implementation providers. - * - * @version $Rev$ $Date$ - */ -public class TestEJBImplementationProviderFactory implements ImplementationProviderFactory<EJBImplementation> { - - /** - * Constructs a resource implementation. - */ - public TestEJBImplementationProviderFactory(ExtensionPointRegistry extensionPoints) { - } - - public ImplementationProvider createImplementationProvider(RuntimeComponent component, EJBImplementation implementation) { - return new TestEJBImplementationProvider(component, implementation); - } - - public Class<EJBImplementation> getModelType() { - return EJBImplementation.class; - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java deleted file mode 100644 index 34bf3702d3..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java +++ /dev/null @@ -1,141 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URI; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -public class TestExternalEarModelResolver implements ModelResolver { - - private Map<URI, ExternalEarInfo> map = new HashMap<URI, ExternalEarInfo>(); - private JavaEEIntrospector jeeIntrospector; - private ContributionService contributionService; - - - public TestExternalEarModelResolver(Contribution contribution, ExtensionPointRegistry extensionPoints) { - jeeIntrospector = extensionPoints.getExtensionPoint(JavaEEIntrospector.class); - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - contributionService = utilities.getUtility(ContributionService.class); - - } - - public void addModel(Object resolved) { - ExternalEarInfo jeeApp = (ExternalEarInfo)resolved; - map.put(jeeApp.getAppInfo().getUri(), jeeApp); - } - - public Object removeModel(Object resolved) { - return map.remove(((ExternalEarInfo)resolved).getAppInfo().getUri()); - } - - public <T> T resolveModel(final Class<T> modelClass, T unresolved) { - URI uri = ((ExternalEarInfo)unresolved).getAppInfo().getUri(); - if (uri != null) { - ExternalEarInfo resolved = (ExternalEarInfo) map.get(uri); - if (resolved != null) { - return modelClass.cast(resolved); - } else { - // if you don't care about application composites you can - // simply read the EAR directly - /* - try { - File f = new File(uri.toString()); - final JavaEEApplicationInfo o = jeeIntrospector.introspectJeeArchive(f.toURI().toURL()); - return (T)new ExternalEarInfo() { - public JavaEEApplicationInfo getAppInfo() { - return (JavaEEApplicationInfo)o; - } - }; - } catch (Exception e) { - throw new RuntimeException(e); - } - */ - - // if you do care about the application composite you - // need to process the ear as a contribution - try{ - // find the location of the ear using a very specific algorithm - URL earLocation = null; - if ( uri.toString().equals("itest-contribution-jee-samples-13-ear-nonenhanced.ear")){ - earLocation = new File("../contribution-jee-samples/ear-nonenhanced/target/itest-contribution-jee-samples-13-ear-nonenhanced.ear").toURL(); - } else if ( uri.toString().equals("itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear")){ - earLocation = new File("../contribution-jee-samples/ear-appcomp-contrib-implicit/target/itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear").toURL(); - } else if ( uri.toString().equals("itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp.ear")){ - earLocation = new File("../contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/target/itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp.ear").toURL(); - } else { - return unresolved; - } - - // if you do care about application composites we have - // to process the EAR as a contribution - Contribution contribution = contributionService.contribute(uri.toString(), earLocation, false); - - JavaEEApplicationInfo appInfo = null; - Composite appComposite = null; - - // get the ear info - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof JavaEEApplicationInfo){ - appInfo = (JavaEEApplicationInfo)artifact.getModel(); - } - - if (artifact.getURI().equals("META-INF/application.composite")){ - appComposite = (Composite)artifact.getModel(); - } - } - - - final JavaEEApplicationInfo returnAppInfo = appInfo; - final Composite returnAppComposite = appComposite; - - return (T)new ExternalEarInfo() { - public JavaEEApplicationInfo getAppInfo() { - return returnAppInfo; - } - public Composite getAppComposite() { - return returnAppComposite; - } - }; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - return unresolved; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver deleted file mode 100644 index a39171507c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver +++ /dev/null @@ -1,18 +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.
-
-org.apache.tuscany.sca.test.contribution.jee.TestExternalEarModelResolver;model=org.apache.tuscany.sca.contribution.jee.ExternalEarInfo
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory deleted file mode 100644 index adc93d9015..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory +++ /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 implementation extension
-org.apache.tuscany.sca.test.contribution.jee.TestEJBImplementationProviderFactory;model=org.apache.tuscany.sca.implementation.ejb.EJBImplementation
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java deleted file mode 100644 index b81f67c287..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java +++ /dev/null @@ -1,329 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -/** - * This is an integration test for Java EE contribution processing. * - * - * @version $Rev$ $Date$ - */ - -public class ContributionServiceTestCase { - private static final String CONTRIBUTION_001_ID = "contribution001/"; - private static final String CONTRIBUTION_002_ID = "contribution002/"; - private static final String JAR_CONTRIBUTION = "/repository/helloworld-service.jar"; - private static final String EJB_JAR_CONTRIBUTION = "/repository/helloworld-ejb.jar"; - private static final String EJB_JAR_W_DEPLOYABLE_CONTRIBUTION = "/repository/helloworld-ejb-w-dep.jar"; - private static final String WAR_CONTRIBUTION = "/repository/helloworld-web.war"; - private static final String WAR_W_DEPLOYABLE_CONTRIBUTION = "/repository/helloworld-web-w-dep.war"; - private static final String EAR_CONTRIBUTION = "/repository/helloworld-ejb.ear"; - private static final String EAR_NONENHANCED_CONTRIBUTION = "/repository/simple-app-ear.jar"; - private static final String EAR_ENHANCED_16_CONTRIBUTION = "/repository/simple-app.ear"; - private static final String EAR_ENHANCED_19_CONTRIBUTION = "/repository/enhanced-app.ear"; - - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - /** - * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending - * unit.framework.TestCase. So this method is used to create a test Embedded SCA Domain, to start the SCA Domain and - * to get a reference to the contribution service - */ - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * This method tests a non Java EE contribution. - */ - @Test - public void testContributeJAR() throws Exception { - URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - } - - /** - * This method tests an EJB jar as a contribution. - */ - @Test - public void testContributeEJBJAR() throws Exception { - URL contributionLocation = getClass().getResource(EJB_JAR_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - - Contribution contribution = contributionService.getContribution(contributionId); - List<Artifact> artifacts = contribution.getArtifacts(); - for(Artifact artifact : artifacts) { - if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) { - Composite composite = (Composite)artifact.getModel(); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation); - EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation(); - Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size()); - Service service = ejbImpl.getServices().get(0); - Assert.assertEquals("Service name", "HelloworldService", service.getName()); - } - } - } - - /** - * This method tests an EJB jar with sca-contribution.xml as a contribution. - */ - @Test - public void testContributeEJBJARwDeployable() throws Exception { - URL contributionLocation = getClass().getResource(EJB_JAR_W_DEPLOYABLE_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - - Contribution contribution = contributionService.getContribution(contributionId); - List<Artifact> artifacts = contribution.getArtifacts(); - for(Artifact artifact : artifacts) { - if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) { - Composite composite = (Composite)artifact.getModel(); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation); - EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation(); - Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size()); - Service service = ejbImpl.getServices().get(0); - Assert.assertEquals("Service name", "HelloworldService", service.getName()); - } - } - - List<Composite> deployables = contribution.getDeployables(); - Assert.assertEquals("Deployable composites", 1, deployables.size()); - Composite composite = deployables.get(0); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation); - EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation(); - Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size()); - Service service = ejbImpl.getServices().get(0); - Assert.assertEquals("Service name", "HelloworldService", service.getName()); - } - - /** - * This method tests WAR as a contribution. - */ - @Test - public void testContributeWAR() throws Exception { - URL contributionLocation = getClass().getResource(WAR_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - - Contribution contribution = contributionService.getContribution(contributionId); - List<Artifact> artifacts = contribution.getArtifacts(); - for(Artifact artifact : artifacts) { - if(artifact.getURI().toString().equals("WEB-INF/web.composite")) { - Composite composite = (Composite)artifact.getModel(); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.web", component.getImplementation() instanceof WebImplementation); - WebImplementation webImpl = (WebImplementation) component.getImplementation(); - Assert.assertEquals("Number of reference", 2, webImpl.getReferences().size()); - List<String> referenceNames = new ArrayList<String>(); - referenceNames.add("name1"); - referenceNames.add("sample.HelloworldEjbServlet_service"); - for(Reference ref : webImpl.getReferences()) { - Assert.assertTrue(referenceNames.contains(ref.getName())); - } - } - } - } - - /** - * This method tests WAR with sca-contribution.xml as a contribution. - */ - @Test - public void testContributeWARwDeployable() throws Exception { - URL contributionLocation = getClass().getResource(WAR_W_DEPLOYABLE_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - - Contribution contribution = contributionService.getContribution(contributionId); - List<Artifact> artifacts = contribution.getArtifacts(); - for(Artifact artifact : artifacts) { - if(artifact.getURI().toString().equals("WEB-INF/web.composite")) { - Composite composite = (Composite)artifact.getModel(); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.web", component.getImplementation() instanceof WebImplementation); - WebImplementation webImpl = (WebImplementation) component.getImplementation(); - Assert.assertEquals("Number of reference", 2, webImpl.getReferences().size()); - List<String> referenceNames = new ArrayList<String>(); - referenceNames.add("name1"); - referenceNames.add("sample.HelloworldEjbServlet_service"); - for(Reference ref : webImpl.getReferences()) { - Assert.assertTrue(referenceNames.contains(ref.getName())); - } - } - } - - List<Composite> deployables = contribution.getDeployables(); - Assert.assertEquals("Deployable composites", 1, deployables.size()); - Composite composite = deployables.get(0); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.web", component.getImplementation() instanceof WebImplementation); - WebImplementation webImpl = (WebImplementation) component.getImplementation(); - Assert.assertEquals("Number of reference", 2, webImpl.getReferences().size()); - List<String> referenceNames = new ArrayList<String>(); - referenceNames.add("name1"); - referenceNames.add("sample.HelloworldEjbServlet_service"); - for(Reference ref : webImpl.getReferences()) { - Assert.assertTrue(referenceNames.contains(ref.getName())); - } - } - - /** - * This method test EAR as a contribution. - */ - @Test - public void testContributeEAR() throws Exception { - URL contributionLocation = getClass().getResource(EAR_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(contributionId)); - } - - /** - * This method tests a JAR containing an EAR as a contribution. - * non-enhanced EAR containing non-enhanced WAR, non-enhanced EJB JAR. - */ - @Ignore - @Test - public void testContributeEAR_NonEnhanced() throws Exception { - URL contributionLocation = getClass().getResource(EAR_NONENHANCED_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Contribution contribution = contributionService.getContribution(contributionId); - Assert.assertNotNull(contribution); - List<Composite> deployables = contribution.getDeployables(); - Assert.assertEquals("Deployable composites", 1, deployables.size()); - Composite composite = deployables.get(0); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.jee", component.getImplementation() instanceof JEEImplementation); - JEEImplementation jeeImpl = (JEEImplementation)component.getImplementation(); - Assert.assertEquals("Number of services", 2, jeeImpl.getServices().size()); - Assert.assertEquals("Number of references", 1, jeeImpl.getReferences().size()); - } - - /** - * This method tests an EAR as a contribution. - * Enhanced EAR containing non-enhanced WAR, non-enhanced EJB JAR. - */ - @Test - public void testContributeEAR_Enhanced16() throws Exception { - URL contributionLocation = getClass().getResource(EAR_ENHANCED_16_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Contribution contribution = contributionService.getContribution(contributionId); - Assert.assertNotNull(contribution); - List<Composite> deployables = contribution.getDeployables(); - Assert.assertEquals("Deployable composites", 1, deployables.size()); - Composite composite = deployables.get(0); - Assert.assertEquals("Number of components", 1, composite.getComponents().size()); - Component component = composite.getComponents().get(0); - Assert.assertTrue("Component with implementation.jee", component.getImplementation() instanceof JEEImplementation); - JEEImplementation jeeImpl = (JEEImplementation)component.getImplementation(); - Assert.assertEquals("Number of services", 2, jeeImpl.getServices().size()); - // TODO - TUSCANY-3008 - // Assert.assertEquals("Number of references", 1, jeeImpl.getReferences().size()); - } - - /** - * This method tests an EAR as a contribution. - * Enhanced EAR w application composite containing non-enhanced WAR, non-enhanced EJB JAR. - */ - @Test - public void testContributeEAR_Enhanced19() throws Exception { - URL contributionLocation = getClass().getResource(EAR_ENHANCED_19_CONTRIBUTION); - String contributionId = CONTRIBUTION_001_ID; - contributionService.contribute(contributionId, contributionLocation, false); - Contribution contribution = contributionService.getContribution(contributionId); - Assert.assertNotNull(contribution); - - List<Artifact> artifacts = contribution.getArtifacts(); - for(Artifact artifact : artifacts) { - if(artifact.getURI().toString().equals("META-INF/application.composite")) { - Composite composite = (Composite)artifact.getModel(); - Assert.assertEquals("Number of components", 3, composite.getComponents().size()); - for(Component component : composite.getComponents()) { - if(component.getName().equals("webComponent")) { - Assert.assertTrue(component.getImplementation() instanceof WebImplementation); - WebImplementation webImpl = (WebImplementation)component.getImplementation(); - Assert.assertEquals("Number of references", 1, webImpl.getReferences().size()); - } else if(component.getName().equals("ejbComponent1")) { - Assert.assertTrue(component.getImplementation() instanceof EJBImplementation); - EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation(); - Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size()); - Assert.assertEquals("Number of references", 0, ejbImpl.getReferences().size()); - } else if(component.getName().equals("ejbComponent2")) { - Assert.assertTrue(component.getImplementation() instanceof EJBImplementation); - EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation(); - Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size()); - Assert.assertEquals("Number of references", 1, ejbImpl.getReferences().size()); - } - } - } - } - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/EjbAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/EjbAppcompTestCase.java deleted file mode 100644 index 4241b7928f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/EjbAppcompTestCase.java +++ /dev/null @@ -1,110 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class EjbAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * EJB - It's an JEE EAR file that is a contribution - * appcomp - It has an application composite in it - * - */ - @Test - public void testEjbAppcom() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/ejb-appcomp-contrib-implicit/target/itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit.jar").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - Assert.assertEquals(1, composite.getComponents().size()); - Assert.assertEquals(1, composite.getComponents().get(0).getImplementation().getServices().size()); - Assert.assertEquals("HelloworldService", composite.getComponents().get(0).getImplementation().getServices().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java deleted file mode 100644 index 64c31b4393..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java +++ /dev/null @@ -1,124 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -import sample.pojo.HelloworldClient2; - - -public class SCAJarEarAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * SCAJAR - It's an SCA contribution in a JAR with no nested archives - * but which references a... - * EAR - It's an JEE EAR file - * appcomp - It has an application composite in it - * - */ - @Test - public void testSCAJarEarAppcomp() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/scajar-ear-appcomp/target/itest-contribution-jee-samples-41-scajar-ear-appcomp.jar").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - domain.getDomainComposite().getIncludes().add(composite); - - Assert.assertEquals(3, composite.getComponents().size()); - Assert.assertEquals(3, composite.getComponents().get(1).getImplementation().getServices().size()); - Assert.assertEquals("TheService", composite.getComponents().get(1).getImplementation().getServices().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - domain.getCompositeActivator().activate(composite); - domain.getCompositeActivator().start(composite); - - HelloworldClient2 client = domain.getService(HelloworldClient2.class, "HelloworldClientComponent"); - Assert.assertEquals("Hello Fred Java", client.getGreetings("Fred")); - - domain.stop(); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java deleted file mode 100644 index 9f50ea573c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java +++ /dev/null @@ -1,125 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -import sample.pojo.HelloworldClient2; - - -public class SCAJarEarAppcompWarAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * SCAJAR - It's an SCA contribution in a JAR with no nested archives - * but which references a... - * EAR - It's an JEE EAR file - * appcomp - It has an application composite in it - * WAR - It has a WAR (and and EAR) in it - * appcomp - It has an application composite in it which should be ignored - */ - @Test - public void testSCAJarEarAppcomp() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/scajar-ear-appcomp-war-appcomp/target/itest-contribution-jee-samples-43-scajar-ear-appcomp-war-appcomp.jar").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - domain.getDomainComposite().getIncludes().add(composite); - - Assert.assertEquals(3, composite.getComponents().size()); - Assert.assertEquals(2, composite.getComponents().get(1).getImplementation().getServices().size()); - Assert.assertEquals("TheService", composite.getComponents().get(1).getImplementation().getServices().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - domain.getCompositeActivator().activate(composite); - domain.getCompositeActivator().start(composite); - - HelloworldClient2 client = domain.getService(HelloworldClient2.class, "HelloworldClientComponent"); - Assert.assertEquals("Hello Fred Java", client.getGreetings("Fred")); - - domain.stop(); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarNonenhancedTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarNonenhancedTestCase.java deleted file mode 100644 index 97e23d1bf7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarNonenhancedTestCase.java +++ /dev/null @@ -1,139 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class SCAJarEarNonenhancedTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - private static final String CONTRIBUTION_002_ID = "contribution002/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - /** - * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending - * unit.framework.TestCase. So this method is used to create a test Embedded SCA Domain, to start the SCA Domain and - * to get a reference to the contribution service - */ - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * SCAJAR - It's an SCA contribution in a JAR with no nested archives - * but which references a... - * EAR - It's an JEE EAR file - * nonenhanced - It has no SCA enhancements. Just a normal EAR - * - */ - @Test - public void testSCAJarEarNonenhanced() throws Exception{ - /* some thoughts about how to preprocess the ear - * as an alternative to relying on the model resolver - * to do contribution processing. - - // Get some things from the extension registry that help us create the - // link between the contribution and the ear that it references - ExtensionPointRegistry registry = domain.getExtensionPointRegistry(); - ModelResolverExtensionPoint modelResolvers = registry.getExtensionPoint(ModelResolverExtensionPoint.class); - Class<? extends ModelResolver> externalEarModelResolver = modelResolvers.getResolver(ExternalEarInfo.class); - - // locate the ear - URL earLocation = new File("../contribution-jee-samples/ear-nonenhanced/target/itest-contribution-jee-samples-13-ear-nonenhanced.ear").toURL(); - contributionService.contribute(CONTRIBUTION_001_ID, earLocation, false); - - // find the app info - for (Artifact artifact : contributionService.getContribution(CONTRIBUTION_001_ID).getArtifacts()){ - if (artifact.getModel() instanceof JavaEEApplicationInfo){ - // need to make this model available to the external ear model - // resolver. But how? - } - } - */ - - URL contributionLocation = new File("../contribution-jee-samples/scajar-ear-nonenhanced/target/itest-contribution-jee-samples-35-scajar-ear-nonenhanced.jar").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_002_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - Assert.assertEquals(2, composite.getComponents().size()); - Assert.assertEquals(4, composite.getComponents().get(1).getImplementation().getServices().size()); - Assert.assertEquals("HelloworldService7Bean_HelloworldService7", composite.getComponents().get(1).getImplementation().getServices().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipEjbAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipEjbAppcompTestCase.java deleted file mode 100644 index db4d9e5bf6..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipEjbAppcompTestCase.java +++ /dev/null @@ -1,112 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class SCAZipEjbAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * SCAZIP - It's an SCA contribution in a ZIP with no nested archive - * but with a reference to an EJB Jar - * JAR - * appcomp - It has an application composite in it - * - */ - @Test - public void testSCAZipEjbAppcomp() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/scazip-ejb-appcomp/target/itest-contribution-jee-samples-10-scazip-ejb-appcomp.zip").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - Assert.assertEquals(2, composite.getComponents().size()); - Assert.assertEquals(1, composite.getComponents().get(1).getImplementation().getServices().size()); - Assert.assertEquals("HelloworldServiceBean_HelloworldService", composite.getComponents().get(1).getImplementation().getServices().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipWarAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipWarAppcompTestCase.java deleted file mode 100644 index 211f51c9bd..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAZipWarAppcompTestCase.java +++ /dev/null @@ -1,114 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class SCAZipWarAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * SCAJAR - It's an SCA contribution in a JAR with no nested archives - * but which references a... - * EAR - It's an JEE EAR file - * appcomp - It has an application composite in it - * - */ - // not picking up references correctly - @Ignore - @Test - public void testSCAJarEarNonenhanced() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/scazip-war-appcomp/target/itest-contribution-jee-samples-04-scazip-war-appcomp.zip").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - Assert.assertEquals(1, composite.getComponents().size()); - Assert.assertEquals(1, composite.getComponents().get(0).getImplementation().getReferences().size()); - Assert.assertEquals("????", composite.getComponents().get(0).getImplementation().getReferences().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WARAppcompContribImplicitTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WARAppcompContribImplicitTestCase.java deleted file mode 100644 index 7696b64f9c..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WARAppcompContribImplicitTestCase.java +++ /dev/null @@ -1,86 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class WARAppcompContribImplicitTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - /** - * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending - * unit.framework.TestCase. So this method is used to create a test Embedded SCA Domain, to start the SCA Domain and - * to get a reference to the contribution service - */ - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * WAR - It's a WAR - * Appcomp - It has an application composite - * Contrib - It's a contribution in it's own right - * Implicit - Composite deployment is implicit - * - */ - @Test - public void testWARAppcompContribImplicit() throws Exception { - URL contributionLocation = new File("../contribution-jee-samples/war-appcomp-contrib-implicit/target/itest-contribution-jee-samples-06-war-appcomp-contrib-implicit.war").toURL(); - contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - Assert.assertNotNull(contributionService.getContribution(CONTRIBUTION_001_ID)); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WarAppcompTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WarAppcompTestCase.java deleted file mode 100644 index f54a4f98df..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/WarAppcompTestCase.java +++ /dev/null @@ -1,110 +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 org.apache.tuscany.sca.test.contribution.jee; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; -import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; -import org.apache.tuscany.sca.implementation.jee.JEEImplementation; -import org.apache.tuscany.sca.implementation.web.WebImplementation; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -public class WarAppcompTestCase { - - private static final String CONTRIBUTION_001_ID = "contribution001/"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private ContributionService contributionService; - - @Before - public void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - //get a reference to the contribution service - contributionService = domain.getContributionService(); - } - - /** - * EJB - It's an JEE EAR file that is a contribution - * appcomp - It has an application composite in it - * - */ - @Test - public void testEjbAppcom() throws Exception { - - URL contributionLocation = new File("../contribution-jee-samples/war-appcomp-contrib-implicit/target/itest-contribution-jee-samples-06-war-appcomp-contrib-implicit.war").toURL(); - Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); - - Assert.assertNotNull(contribution); - - Composite composite = null; - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof Composite){ - composite = (Composite) artifact.getModel(); - } - } - - Assert.assertNotNull(composite); - - Assert.assertEquals(1, composite.getComponents().size()); - Assert.assertEquals(1, composite.getComponents().get(0).getImplementation().getReferences().size()); - Assert.assertEquals("helloworldSca", composite.getComponents().get(0).getImplementation().getReferences().get(0).getName()); - - domain.buildComposite(composite); - - // assert that the build process has worked - Assert.assertNotNull(composite); - - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/enhanced-app.ear b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/enhanced-app.ear Binary files differdeleted file mode 100644 index 11d2a029ec..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/enhanced-app.ear +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb-w-dep.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb-w-dep.jar Binary files differdeleted file mode 100644 index a5b160c875..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb-w-dep.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.ear b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.ear Binary files differdeleted file mode 100644 index 9fb1ed9d14..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.ear +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.jar Binary files differdeleted file mode 100644 index 3a704137ed..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-ejb.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-service.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-service.jar Binary files differdeleted file mode 100644 index 228f4d27d7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-service.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web-w-dep.war b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web-w-dep.war Binary files differdeleted file mode 100644 index 0b75db2745..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web-w-dep.war +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web.war b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web.war Binary files differdeleted file mode 100644 index 938ea75941..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/helloworld-web.war +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app-ear.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app-ear.jar Binary files differdeleted file mode 100644 index 24f55a5f63..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app-ear.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app.ear b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app.ear Binary files differdeleted file mode 100644 index c912e64237..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-jee/src/test/resources/repository/simple-app.ear +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/pom.xml deleted file mode 100644 index 2dd332dcc2..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/pom.xml +++ /dev/null @@ -1,51 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-multiple</artifactId> - <name>Apache Tuscany SCA iTest Multiple Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/Hello.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/Hello.java deleted file mode 100644 index 7e574a7db3..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/Hello.java +++ /dev/null @@ -1,27 +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 hello; - -/** - * This is the business interface of the Hello service. - */ -public interface Hello { - - public String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/HelloImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/HelloImpl.java deleted file mode 100644 index ff9f6e75f3..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/hello/HelloImpl.java +++ /dev/null @@ -1,33 +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 hello; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(Hello.class) -public class HelloImpl implements Hello { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c062afaed0..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +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 helloworld; - -import hello.Hello; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - @Reference - protected Hello helloServiceRef; - - public String getGreetings(String name) { - return helloServiceRef.getGreetings(name); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldService.java deleted file mode 100644 index 5251fc0a45..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/helloworld/HelloWorldService.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 helloworld; - - -/** - * This is the business interface of the HelloWorld greetings service. - */ -public interface HelloWorldService { - - public String getGreetings(String name); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionCycleTestCaseFIXME.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionCycleTestCaseFIXME.java deleted file mode 100644 index ec5123eb2d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionCycleTestCaseFIXME.java +++ /dev/null @@ -1,121 +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 test; - -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import junit.framework.TestCase; - -/** - * Test multiple contributions scenario - * - * FIXME This test case causes a StackOverflowException instead of - * reporting an error when a composite is not found, as there's a - * dependency cycle in the test contributions and the model resolvers - * do not handle import cycles properly. - * - */ -public class ContributionCycleTestCaseFIXME extends TestCase { - - private String helloContribution_dir = "target/test-classes/contribution-cycle-export"; - private String helloWorldContribution_one_dir = "target/test-classes/contribution-cycle-import"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloContribution; - private Contribution helloWorldContribution_one; - - protected void setUp() throws Exception { - URL helloContribution_URL = new java.io.File(helloContribution_dir).toURI().toURL(); - URL helloWorldContribution_one_URL = new java.io.File(helloWorldContribution_one_dir).toURI().toURL(); - - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - // Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - helloContribution = - contributionService.contribute("http://contribution-multiple/helloworld", helloContribution_URL, false); - - for (Composite deployable : helloContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - for (Composite deployable : helloContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - helloWorldContribution_one = - contributionService.contribute("http://contribution-multiple/helloworld_one", helloWorldContribution_one_URL, false); - for (Composite deployable : helloWorldContribution_one.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - for (Composite deployable : helloWorldContribution_one.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService_one = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent_one/HelloWorldService"); - assertNotNull(helloWorldService_one); - - assertEquals("Hello Smith", helloWorldService_one.getGreetings("Smith")); - - } - - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://contribution-multiple/helloworld"); - contributionService.remove("http://contribution-multiple/helloworld_one"); - - // Stop Components from my composite - for (Composite deployable : helloWorldContribution_one.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - for (Composite deployable : helloContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - // domain.stop(); - domain.close(); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionMultipleTestCaseFIXME.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionMultipleTestCaseFIXME.java deleted file mode 100644 index 133c98f357..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionMultipleTestCaseFIXME.java +++ /dev/null @@ -1,131 +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 test; - -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import junit.framework.TestCase; - -/** - * Test multiple contribution scenario - * Contributed by TUSCANY-1718 - */ -public class ContributionMultipleTestCaseFIXME extends TestCase { - - private String helloContribution_dir = "target/test-classes/contribution-export"; - private String helloWorldContribution_one_dir = "target/test-classes/contribution-import-one"; - private String helloWorldContribution_two_dir = "target/test-classes/contribution-import-two"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloContribution; - private Contribution helloWorldContribution_one; - private Contribution helloWorldContribution_two; - - protected void setUp() throws Exception { - URL helloContribution_URL = new java.io.File(helloContribution_dir).toURI().toURL(); - URL helloWorldContribution_one_URL = new java.io.File(helloWorldContribution_one_dir).toURI().toURL(); - URL helloWorldContribution_two_URL = new java.io.File(helloWorldContribution_two_dir).toURI().toURL(); - - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - // Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - helloContribution = - contributionService.contribute("http://contribution-multiple/helloworld", helloContribution_URL, false); - - helloWorldContribution_one = - contributionService.contribute("http://contribution-multiple/helloworld_one", helloWorldContribution_one_URL, false); - - helloWorldContribution_two = - contributionService.contribute("http://contribution-multiple/helloworld_two", helloWorldContribution_two_URL, false); - - for (Composite deployable : helloContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - } - - for (Composite deployable : helloWorldContribution_one.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - } - - for (Composite deployable : helloWorldContribution_two.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - } - - domain.buildComposite(domain.getDomainComposite()); - domain.getCompositeActivator().activate(domain.getDomainComposite()); - domain.getCompositeActivator().start(domain.getDomainComposite()); - - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService_one = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent_one/HelloWorldService"); - assertNotNull(helloWorldService_one); - - assertEquals("Hello Smith", helloWorldService_one.getGreetings("Smith")); - - HelloWorldService helloWorldService_two = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent_two/HelloWorldService"); - assertNotNull(helloWorldService_two); - - assertEquals("Hello Smith", helloWorldService_two.getGreetings("Smith")); - - } - - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://contribution-multiple/helloworld"); - contributionService.remove("http://contribution-multiple/helloworld_one"); - contributionService.remove("http://contribution-multiple/helloworld_two"); - - // Stop Components from my composite - for (Composite deployable : helloWorldContribution_two.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - for (Composite deployable : helloWorldContribution_one.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - for (Composite deployable : helloContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - // domain.stop(); - domain.close(); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionTestCase.java deleted file mode 100644 index 790b6fed98..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/java/test/ContributionTestCase.java +++ /dev/null @@ -1,145 +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 test; - -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import junit.framework.TestCase; - -/** - * Test multiple contribution scenario - * Contributed by TUSCANY-1756 - */ -public class ContributionTestCase extends TestCase { - - private String helloContribution_dir = "target/test-classes/contribution-export"; - //private String helloWorldContribution_one_dir = "target/test-classes/contribution-import-one"; - private String helloWorldContribution_two_dir = "target/test-classes/contribution-import-two"; - - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloContribution; - //private Contribution helloWorldContribution_one; - private Contribution helloWorldContribution_two; - - protected void setUp() throws Exception { - URL helloContribution_URL = new java.io.File(helloContribution_dir).toURI().toURL(); - //URL helloWorldContribution_one_URL = new java.io.File(helloWorldContribution_one_dir).toURI().toURL(); - URL helloWorldContribution_two_URL = new java.io.File(helloWorldContribution_two_dir).toURI().toURL(); - - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - // Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - helloContribution = - contributionService.contribute("http://contribution-multiple/helloworld", helloContribution_URL, false); - - //helloWorldContribution_one = - // contributionService.contribute("http://contribution-multiple/helloworld_one", helloWorldContribution_one_URL, false); - - helloWorldContribution_two = - contributionService.contribute("http://contribution-multiple/helloworld_two", helloWorldContribution_two_URL, false); - - for (Composite deployable : helloContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - //for (Composite deployable : helloWorldContribution_one.getDeployables()) { - // domain.getDomainComposite().getIncludes().add(deployable); - // domain.buildComposite(deployable); - //} - - for (Composite deployable : helloWorldContribution_two.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - for (Composite deployable : helloContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - //for (Composite deployable : helloWorldContribution_one.getDeployables()) { - // domain.getCompositeActivator().activate(deployable); - // domain.getCompositeActivator().start(deployable); - //} - - for (Composite deployable : helloWorldContribution_two.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - } - - public void testServiceCall() throws IOException { - //HelloWorldService helloWorldService_one = - //domain.getService(HelloWorldService.class, "HelloWorldServiceComponent_one/HelloWorldService"); - //assertNotNull(helloWorldService_one); - - //assertEquals("Hello Smith", helloWorldService_one.getGreetings("Smith")); - - HelloWorldService helloWorldService_two = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent_two/HelloWorldService"); - assertNotNull(helloWorldService_two); - - assertEquals("Hello Smith", helloWorldService_two.getGreetings("Smith")); - - } - - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://contribution-multiple/helloworld"); - //contributionService.remove("http://contribution-multiple/helloworld_one"); - contributionService.remove("http://contribution-multiple/helloworld_two"); - - // Stop Components from my composite - for (Composite deployable : helloWorldContribution_two.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - //for (Composite deployable : helloWorldContribution_one.getDeployables()) { - // domain.getCompositeActivator().stop(deployable); - // domain.getCompositeActivator().deactivate(deployable); - //} - for (Composite deployable : helloContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - // domain.stop(); - domain.close(); - } - -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/META-INF/sca-contribution.xml deleted file mode 100644 index 8b76783c3d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +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://hello" - xmlns:hello="http://hello"> - <deployable composite="hello:hello"/> - <export namespace="http://hello"/> - <import namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/hello.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/hello.composite deleted file mode 100644 index aeeab337fa..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-export/hello.composite +++ /dev/null @@ -1,31 +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://hello" - xmlns:hello="http://hello" - name="hello"> - - <service name="HelloService" promote="HelloServiceComponent"/> - - <component name="HelloServiceComponent"> - <implementation.java class="hello.HelloImpl" /> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/META-INF/sca-contribution.xml deleted file mode 100644 index bfbf74373a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello"> - <deployable composite="helloworld:helloworld_one"/> - <import namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/helloworld_one.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/helloworld_one.composite deleted file mode 100644 index 7a8003577e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-cycle-import/helloworld_one.composite +++ /dev/null @@ -1,35 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello" - name="helloworld_one"> - - <component name="SourceHelloServiceComponent_one"> - <implementation.composite name="hello:helloexport"/> - </component> - - <component name="HelloWorldServiceComponent_one"> - <implementation.java class="helloworld.HelloWorldImpl" /> - <reference name="helloServiceRef" target="SourceHelloServiceComponent_one/HelloService"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/META-INF/sca-contribution.xml deleted file mode 100644 index bea6f39932..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +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://hello" - xmlns:hello="http://hello"> - <deployable composite="hello:hello"/> - <export namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/hello.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/hello.composite deleted file mode 100644 index aeeab337fa..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-export/hello.composite +++ /dev/null @@ -1,31 +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://hello" - xmlns:hello="http://hello" - name="hello"> - - <service name="HelloService" promote="HelloServiceComponent"/> - - <component name="HelloServiceComponent"> - <implementation.java class="hello.HelloImpl" /> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/META-INF/sca-contribution.xml deleted file mode 100644 index bfbf74373a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello"> - <deployable composite="helloworld:helloworld_one"/> - <import namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/helloworld_one.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/helloworld_one.composite deleted file mode 100644 index 45cb504ea4..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-one/helloworld_one.composite +++ /dev/null @@ -1,35 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello" - name="helloworld_one"> - - <component name="SourceHelloServiceComponent_one"> - <implementation.composite name="hello:hello"/> - </component> - - <component name="HelloWorldServiceComponent_one"> - <implementation.java class="helloworld.HelloWorldImpl" /> - <reference name="helloServiceRef" target="SourceHelloServiceComponent_one/HelloService"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/META-INF/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/META-INF/sca-contribution.xml deleted file mode 100644 index cbabdcd4fc..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello"> - <deployable composite="helloworld:helloworld_two"/> - <import namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/helloworld_two.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/helloworld_two.composite deleted file mode 100644 index 4c9225de34..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution-multiple/src/test/resources/contribution-import-two/helloworld_two.composite +++ /dev/null @@ -1,35 +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://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello" - name="helloworld_two"> - - <component name="SourceHelloServiceComponent_two"> - <implementation.composite name="hello:hello"/> - </component> - - <component name="HelloWorldServiceComponent_two"> - <implementation.java class="helloworld.HelloWorldImpl" /> - <reference name="helloServiceRef" target="SourceHelloServiceComponent_two/HelloService"/> - </component> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/pom.xml deleted file mode 100644 index e41db401dc..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/pom.xml +++ /dev/null @@ -1,52 +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-itest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution</artifactId> - <name>Apache Tuscany SCA iTest Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.5.1</version> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddService.java deleted file mode 100644 index 4e72f92fda..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,32 +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;
-
-/**
- * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this
- * interface. Implementation for these methods is provided in AddServiceImpl Class
- */
-public interface AddService {
-
- /**
- * This is an add method which takes 2 parameters of double type and returns the sum of two parameters
- */
- double add(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/AddServiceImpl.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 Add service
- */
-public class AddServiceImpl implements AddService {
-
- public double add(double n1, double n2) {
- return n1 + n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 719ad69eef..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,46 +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.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- */
-public class CalculatorClient {
- public static void main(String[] args) throws Exception {
-
- SCADomain domain = SCADomain.newInstance("calculator/Calculator.composite");
-
- CalculatorService calculatorService = domain.getService(CalculatorService.class,
- "CalculatorServiceComponent");
-
- // Calculate
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- domain.close();
-
- }
-
-}
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index f288af0174..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/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;
-
-/**
- * This is a Calculator service interface. All the methods which are to be accessed as a service are declared in this
- * interface but not the implementation of those methods.
- */
-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/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ae4ed12b7b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +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 setDivideService(DivideService divideService) {
- this.divideService = divideService;
- }
-
- @Reference
- public void setMultiplyService(MultiplyService multiplyService) {
- this.multiplyService = multiplyService;
- }
-
- public double add(double n1, double n2) {
- return addService.add(n1, n2);
- }
-
- public double subtract(double n1, double n2) {
- return subtractService.subtract(n1, n2);
- }
-
- public double multiply(double n1, double n2) {
- return multiplyService.multiply(n1, n2);
- }
-
- public double divide(double n1, double n2) {
- return divideService.divide(n1, n2);
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/DivideService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/DivideService.java deleted file mode 100644 index ad99418f5b..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,32 +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;
-
-/**
- * This is an interface for Divide Service which has divide method declared which is implemented in DivideServiceImpl
- * class
- */
-public interface DivideService {
-
- /**
- * This is a divide method which takes 2 parameters of double type and returns the result of division
- */
- double divide(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/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/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 3987b0a54f..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,33 +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;
-
-/**
- * This is an interface for Multiply Service which has multiply method declared which is implemented in
- * MultiplyServiceImpl class
- */
-public interface MultiplyService {
-
- /**
- * This is a multiply method which takes 2 parameters of double type and returns the result of multiplication of the
- * two parameters
- */
- double multiply(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/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/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 25e0ed6ca7..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,33 +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;
-
-/**
- * This is an interface for Subtract Service which has subtract method declared which is implemented in
- * SubtractServiceImpl class
- */
-
-public interface SubtractService {
-
- /**
- * This is a subtract method which takes 2 parameters of double type and returns the result of subtraction.
- */
- double subtract(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/java/calculator/SubtractServiceImpl.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 subtract service.
- */
-public class SubtractServiceImpl implements SubtractService {
-
- public double subtract(double n1, double n2) {
- return n1 - n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/ContributionTest.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/ContributionTest.composite deleted file mode 100644 index d814e439e2..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/ContributionTest.composite +++ /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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:foo="http://foo" - name="ContributionTest"> - -</composite> diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/Calculator.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/Calculator.composite deleted file mode 100644 index 657a2f95d8..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/Calculator.composite +++ /dev/null @@ -1,51 +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"
- name="Calculator">
-
- <service name="CalculatorService" promote="CalculatorServiceComponent">
- <interface.java interface="calculator.CalculatorService"/>
- </service>
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent"></reference>
- <reference name="subtractService" target="SubtractServiceComponent"></reference>
- <reference name="multiplyService" target="MultiplyServiceComponent"></reference>
- <reference name="divideService" target="DivideServiceComponent"></reference>
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/sca-contribution.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/sca-contribution.xml deleted file mode 100644 index e95796d83a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/main/resources/calculator/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:Calculator"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java deleted file mode 100644 index 97b2e5d6ed..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java +++ /dev/null @@ -1,218 +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 org.apache.tuscany.sca.test.contribution;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
-import org.apache.tuscany.sca.contribution.Artifact;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.contribution.service.util.FileHelper;
-import org.apache.tuscany.sca.contribution.service.util.IOHelper;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-/**
- * This is more intended to be a integration test then a unit test. *
- */
-public class ContributionServiceTestCase extends TestCase {
- private static final String CONTRIBUTION_001_ID = "contribution001/";
- private static final String CONTRIBUTION_002_ID = "contribution002/";
- private static final String JAR_CONTRIBUTION = "/repository/sample-calculator.jar";
- private static final String FOLDER_CONTRIBUTION = "target/classes/";
-
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private ContributionService contributionService;
-
- /**
- * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending
- * unit.framework.TestCase. So this method is used to create a test Embedded SCA Domain, to start the SCA Domain and
- * to get a reference to the contribution service
- */
-
- @Override
- protected void setUp() throws Exception {
- //Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- //Start the domain
- domain.start();
-
- //get a reference to the contribution service
- contributionService = domain.getContributionService();
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contrututionId with the value retrieved from the SCA runtime.
- */
- public void testContributeJAR() throws Exception {
- URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION);
- //URL contributionLocation = new URL("file:/D:/dev/Opensource/Apache/Tuscany/source/java/sca/samples/calculator/target/sample-calculator.jar");
- String contributionId = CONTRIBUTION_001_ID;
- contributionService.contribute(contributionId, contributionLocation, false);
- assertNotNull(contributionService.getContribution(contributionId));
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contrututionId with the value retrieved from the SCA runtime using
- * contributionService.
- */
- public void testStoreContributionPackageInRepository() throws Exception {
- URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION);
- String contributionId = CONTRIBUTION_001_ID;
- contributionService.contribute(contributionId, contributionLocation, true);
-
- assertTrue(FileHelper.toFile(new URL(contributionService.getContribution(contributionId).getLocation()))
- .exists());
-
- assertNotNull(contributionId);
-
- Contribution contributionModel = contributionService.getContribution(contributionId);
-
- File contributionFile = FileHelper.toFile(new URL(contributionModel.getLocation()));
- assertTrue(contributionFile.exists());
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contrututionId with the value retrieved from the SCA runtime using
- * contributionService.
- */
- public void testStoreContributionStreamInRepository() throws Exception {
- URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION);
- String contributionId = CONTRIBUTION_001_ID;
-
- InputStream contributionStream = contributionLocation.openStream();
- try {
- contributionService.contribute(contributionId, contributionLocation, contributionStream);
- } finally {
- IOHelper.closeQuietly(contributionStream);
- }
-
- assertTrue(FileHelper.toFile(new URL(contributionService.getContribution(contributionId).getLocation()))
- .exists());
-
- assertNotNull(contributionId);
-
- Contribution contributionModel = contributionService.getContribution(contributionId);
-
- File contributionFile = FileHelper.toFile(new URL(contributionModel.getLocation()));
- assertTrue(contributionFile.exists());
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contributionId1,contributionId2 with the value retrieved from the SCA
- * runtime using contributionService.
- */
- public void testStoreDuplicatedContributionInRepository() throws Exception {
- URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION);
- String contributionId1 = CONTRIBUTION_001_ID;
- contributionService.contribute(contributionId1, contributionLocation, true);
- assertNotNull(contributionService.getContribution(contributionId1));
- String contributionId2 = CONTRIBUTION_002_ID;
- contributionService.contribute(contributionId2, contributionLocation, true);
- assertNotNull(contributionService.getContribution(contributionId2));
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contributionId with the value retrieved from the SCA runtime using
- * contributionService.
- */
- public void testContributeFolder() throws Exception {
- final File rootContributionFolder = new File(FOLDER_CONTRIBUTION);
- String contributionId = CONTRIBUTION_001_ID;
- //first rename the sca-contribution metadata file
- //File calculatorMetadataFile = new File("target/classes/calculator/sca-contribution.xml");
- //File metadataDirectory = new File("target/classes/META-INF/");
- //if (!metadataDirectory.exists()) {
- // FileHelper.forceMkdir(metadataDirectory);
- //}
- //FileHelper.copyFileToDirectory(calculatorMetadataFile, metadataDirectory);
-
- // Requires permission to read user.dir property. Requires PropertyPermision in security policy.
- URL contributionFolderURL;
- try {
- contributionFolderURL = AccessController.doPrivileged(new PrivilegedExceptionAction<URL>() {
- public URL run() throws IOException {
- return rootContributionFolder.toURL();
- }
- });
- } catch (PrivilegedActionException e) {
- throw (IOException)e.getException();
- }
- contributionService.contribute(contributionId, contributionFolderURL, false);
- assertNotNull(contributionService.getContribution(contributionId));
- }
-
- /**
- * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
- * test verifies the string assigned to contributionId, artifactId with the value retrieved from the SCA runtime
- * using contributionService.
- */
- public void testAddDeploymentComposites() throws Exception {
- URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION);
- String contributionId = CONTRIBUTION_001_ID;
- Contribution contribution = contributionService.contribute(contributionId, contributionLocation, false);
- assertNotNull(contributionService.getContribution(contributionId));
-
- String artifactId = "contributionComposite.composite";
- Composite composite = (new DefaultAssemblyFactory()).createComposite();
- composite.setName(new QName(null, "contributionComposite"));
- composite.setURI("contributionComposite.composite");
-
- contributionService.addDeploymentComposite(contribution, composite);
-
- List deployables = contributionService.getContribution(contributionId).getDeployables();
- Composite composite1 = (Composite)deployables.get(deployables.size() - 1);
- assertEquals("contributionComposite", composite1.getName().toString());
-
- Artifact artifact = null;
- contribution = contributionService.getContribution(contributionId);
- String id = artifactId.toString();
- for (Artifact a : contribution.getArtifacts()) {
- if (id.equals(a.getURI())) {
- artifact = a;
- break;
- }
- }
- Composite composite2 = (Composite)artifact.getModel();
- assertEquals("contributionComposite", composite2.getName().toString());
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/deployables/sample-calculator.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/deployables/sample-calculator.jar Binary files differdeleted file mode 100644 index 0ca3a1b781..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/deployables/sample-calculator.jar +++ /dev/null diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/repository/sample-calculator.jar b/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/repository/sample-calculator.jar Binary files differdeleted file mode 100644 index 0ca3a1b781..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/contribution/src/test/resources/repository/sample-calculator.jar +++ /dev/null |