You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/01/21 11:26:29 UTC

svn commit: r901638 - in /tuscany/sandbox/travelsample/contributions/buildingblocks-client: ./ src/ src/main/ src/main/java/ src/main/java/scatours/ src/main/java/scatours/impl/ src/main/resources/ src/main/resources/META-INF/ src/test/ src/test/java/ ...

Author: nash
Date: Thu Jan 21 10:26:28 2010
New Revision: 901638

URL: http://svn.apache.org/viewvc?rev=901638&view=rev
Log:
Add new contribution buildingblocks-client

Added:
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/build.xml
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/pom.xml
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/
    tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/build.xml?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/build.xml (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/build.xml Thu Jan 21 10:26:28 2010
@@ -0,0 +1,22 @@
+<!--
+ * 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="scatours-contribution-buildingblocks-client" default="compile">
+    <import file="../../antdefs.xml"/>
+</project>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/pom.xml?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/pom.xml (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/pom.xml Thu Jan 21 10:26:28 2010
@@ -0,0 +1,111 @@
+<?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>scatours</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent><version>1.0-SNAPSHOT</version>
+    <artifactId>scatours-contribution-buildingblocks-client</artifactId>
+    <name>Apache Tuscany SCA Tours Building Blocks Client Contribution</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <version>${tuscany.version}</version>
+        </dependency>        
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jms-runtime</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-api</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-node-runtime</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jms-asf</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-all</artifactId>
+            <version>5.2.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.activemq</groupId>
+                    <artifactId>activemq-web-demo</artifactId>
+                </exclusion>
+            </exclusions>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${artifactId}</finalName>
+    </build>
+</project>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,26 @@
+/*
+ * 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 scatours;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Bookings {
+    String newBooking(String trip, int people);
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package scatours;
+
+import java.math.BigDecimal;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Checkout {
+    void makePayment(BigDecimal amount, String cardInfo);
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,52 @@
+/*
+ * 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 scatours.impl;
+
+import java.math.BigDecimal;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import scatours.Bookings;
+import scatours.Checkout;
+
+@Service(Runnable.class)
+public class ApplClientImpl {
+    @Reference
+    protected Bookings bookings1, bookings2;
+
+    @Reference
+    protected Checkout checkout1, checkout2;
+
+    public ApplClientImpl() {
+    }
+
+    public void run() {
+        String bookingCode = bookings1.newBooking("FS1APR4", 1);
+        System.out.println("Booking code is " + bookingCode);
+
+        checkout1.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
+
+        bookingCode = bookings2.newBooking("AC3MAY9", 2);
+        System.out.println("Booking code is " + bookingCode);
+
+        checkout2.makePayment(new BigDecimal("2295.00"), "9876123456784321 11/11");
+    }
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,47 @@
+/*
+ * 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 scatours.impl;
+
+import java.math.BigDecimal;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import scatours.Bookings;
+import scatours.Checkout;
+
+@Service(Runnable.class)
+public class ToursClientImpl {
+    @Reference
+    protected Bookings bookings;
+
+    @Reference
+    protected Checkout checkout;
+
+    public ToursClientImpl() {
+    }
+
+    public void run() {
+        String bookingCode = bookings.newBooking("FS1APR4", 1);
+        System.out.println("Booking code is " + bookingCode);
+
+        checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
+    }
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml Thu Jan 21 10:26:28 2010
@@ -0,0 +1,26 @@
+<?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:tst="http://tuscanyscatours.com/">
+    <import namespace="http://tuscanyscatours.com/" />
+    <deployable composite="tst:ToursApplClient" />
+    <deployable composite="tst:ToursImplClient" />
+    <deployable composite="tst:ToursImplIncludeClient" />
+</contribution>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite Thu Jan 21 10:26:28 2010
@@ -0,0 +1,40 @@
+<?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://tuscanyscatours.com/"
+           xmlns:tst="http://tuscanyscatours.com/"
+           name="ToursApplClient">
+
+    <component name="ApplClient">
+        <implementation.java class="scatours.impl.ApplClientImpl" />
+        <reference name="bookings1">
+            <binding.ws uri="http://localhost:8081/BookTrip" />
+        </reference>
+        <reference name="checkout1">
+            <binding.ws uri="http://localhost:8081/Checkout" />
+        </reference>
+        <reference name="bookings2">
+            <binding.jms uri="jms:BookTrip" />
+        </reference>
+        <reference name="checkout2">
+            <binding.jms uri="jms:Checkout" />
+        </reference>
+    </component>
+</composite>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite Thu Jan 21 10:26:28 2010
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           targetNamespace="http://tuscanyscatours.com/"
+           xmlns:tst="http://tuscanyscatours.com/"
+           name="ToursImplClient">
+
+    <component name="ToursClient">
+        <implementation.java class="scatours.impl.ToursClientImpl" />
+        <reference name="bookings" target="MyTours/BookTrip" />
+        <reference name="checkout" target="MyTours/Checkout" />
+    </component>
+
+    <include name="tst:ToursImpl" />
+</composite>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite Thu Jan 21 10:26:28 2010
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           targetNamespace="http://tuscanyscatours.com/"
+           xmlns:tst="http://tuscanyscatours.com/"
+           name="ToursImplIncludeClient">
+
+    <component name="ToursClient">
+        <implementation.java class="scatours.impl.ToursClientImpl" />
+        <reference name="bookings" target="MyTours/BookTrip" />
+        <reference name="checkout" target="MyTours/Checkout" />
+    </component>
+
+    <include name="tst:ToursImplInclude" />
+</composite>

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,77 @@
+/*
+ * 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 scatours;
+
+import org.apache.activemq.broker.BrokerService;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the Building Blocks Composite Application scenario
+ */
+public class BuildingBlocksApplTestCase {
+
+    private BrokerService jmsBroker;
+    private SCANode node1, node2;
+
+    @Before
+    public void startServer() throws Exception {
+        jmsBroker = new BrokerService();
+        jmsBroker.setPersistent(false);
+        jmsBroker.setUseJmx(false);
+        jmsBroker.addConnector("tcp://localhost:61619");
+
+        node1 = SCANodeFactory.newInstance().createSCANode("tours-appl.composite",
+                    new SCAContribution("introducing-trips", "../introducing-trips/target/classes"),
+                    new SCAContribution("buildingblocks", "../buildingblocks/target/classes"));
+
+        node2 = SCANodeFactory.newInstance().createSCANode("tours-appl-client.composite",
+                    new SCAContribution("buildingblocks-client", "./target/classes"));
+
+        jmsBroker.start();
+        node1.start();
+        node2.start();
+    }
+
+    @Test
+    public void testAppl() {
+        Runnable client = ((SCAClient)node2).getService(Runnable.class, "ApplClient/Runnable");
+        client.run();
+    }
+
+    @After
+    public void stopServer() throws Exception {
+        if (node2 != null) {
+            node2.stop();
+        }
+        if (node1 != null) {
+            node1.stop();
+        }
+        if (jmsBroker != null) {
+            jmsBroker.stop();
+        }
+    }
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,59 @@
+/*
+ * 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 scatours;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the Building Blocks Composite Implementation Include scenario
+ */
+public class BuildingBlocksImplIncludeTestCase {
+
+    private SCANode node;
+
+    @Before
+    public void startServer() throws Exception {
+        node = SCANodeFactory.newInstance().createSCANode("tours-impl-include-client.composite",
+                   new SCAContribution("introducing-trips", "../introducing-trips/target/classes"),
+                   new SCAContribution("buildingblocks", "../buildingblocks/target/classes"),
+                   new SCAContribution("buildingblocks-client", "./target/classes"));
+
+        node.start();
+    }
+
+    @Test
+    public void testImplInclude() {
+        Runnable client = ((SCAClient)node).getService(Runnable.class, "ToursClient/Runnable");
+        client.run();
+    }
+
+    @After
+    public void stopServer() throws Exception {
+        if (node != null) {
+            node.stop();
+        }
+    }
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java Thu Jan 21 10:26:28 2010
@@ -0,0 +1,58 @@
+/*
+ * 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 scatours;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the Building Blocks Composite Implementation scenario
+ */
+public class BuildingBlocksImplTestCase {
+
+    private SCANode node;
+
+    @Before
+    public void startServer() throws Exception {
+        node = SCANodeFactory.newInstance().createSCANode("tours-impl-client.composite",
+                   new SCAContribution("buildingblocks", "../buildingblocks/target/classes"),
+                   new SCAContribution("buildingblocks-client", "./target/classes"));
+
+        node.start();
+    }
+
+    @Test
+    public void testImpl() {
+        Runnable client = ((SCAClient)node).getService(Runnable.class, "ToursClient/Runnable");
+        client.run();
+    }
+
+    @After
+    public void stopServer() throws Exception {
+        if (node != null) {
+            node.stop();
+        }
+    }
+}

Added: tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties?rev=901638&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties (added)
+++ tuscany/sandbox/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties Thu Jan 21 10:26:28 2010
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as. 
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.BookTrip = BookTripRequestQueue
+queue.Checkout = CheckoutRequestQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi