tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r549133 [1/2] - in /incubator/tuscany/java/sca/samples/osgi-supplychain: ./ src/ src/main/ src/main/java/ src/main/java/supplychain/ src/main/java/supplychain/customer/ src/main/java/supplychain/retailer/ src/main/java/supplychain/shipper/ ...
Date Wed, 20 Jun 2007 15:28:05 GMT
Author: antelder
Date: Wed Jun 20 08:28:00 2007
New Revision: 549133

URL: http://svn.apache.org/viewvc?view=rev&rev=549133
Log:
TUSCANY-1363, add osgi sample conributed by Rajini Sivaram

Added:
    incubator/tuscany/java/sca/samples/osgi-supplychain/   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/META-INF/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/META-INF/LICENSE.txt   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/META-INF/NOTICE   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/META-INF/README.txt   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Retailer.componentType   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Shipper.componentType   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Warehouse.componentType   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml   (with props)
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/supplychain.composite
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/test/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/test/java/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/test/java/supplychain/
    incubator/tuscany/java/sca/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java   (with props)

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jun 20 08:28:00 2007
@@ -0,0 +1 @@
+\Tuscany\SVN\TRUNK\etc\svn-ignores

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml Wed Jun 20 08:28:00 2007
@@ -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.
+-->
+<project name="OSGiBundleCreator">
+
+    <target name="create-bundles">
+
+        <jar jarfile="${jar.dir}/${jar.file.name}" manifest="${files.dir}/${manifest.file.name}" >
+            <fileset dir="${files.dir}" includes="${files.list}">
+                <!-- include name="${files.list}"/-->
+            </fileset>
+        </jar>
+    </target>
+
+
+</project>

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/build-bundles.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml Wed Jun 20 08:28:00 2007
@@ -0,0 +1,195 @@
+<?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.0-incubating-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-osgi-supplychain</artifactId>
+    <name>Apache Tuscany OSGi Supply Chain Sample</name>
+
+    <repositories>
+       <!-- for felix snapshots -->
+       <repository>
+          <id>apache.snapshots</id>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+       </repository>
+    </repositories>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.main</artifactId>
+            <version>0.9.0-incubator-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr</artifactId>
+            <version>0.9.0-incubator-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-osgi</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+            <finalName>sample-osgi-supplychain</finalName>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>1.1</version>
+                    <executions>
+                        <execution>
+                            <id>create-bundles</id>
+                            <phase>generate-test-sources</phase>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                            <configuration>
+                                <tasks>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="Customer.jar"/>
+                                        <property name="manifest.file.name" value="osgi/Customer.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/customer/Customer.class \
+                                                    supplychain/OSGiBundleImpl.class \
+                                                    supplychain/customer/OSGiCustomerImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="Retailer.jar"/>
+                                        <property name="manifest.file.name" value="osgi/Retailer.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/retailer/Retailer.class \
+                                                    supplychain/OSGiBundleImpl.class \
+                                                    supplychain/retailer/OSGiRetailerImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="Shipper.jar"/>
+                                        <property name="manifest.file.name" value="osgi/Shipper.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/shipper/Shipper.class \
+                                                    supplychain/OSGiBundleImpl.class \
+                                                    supplychain/shipper/OSGiShipperImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="Warehouse.jar"/>
+                                        <property name="manifest.file.name" value="osgi/Warehouse.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/warehouse/Warehouse.class \
+                                                    supplychain/OSGiBundleImpl.class \
+                                                    supplychain/warehouse/OSGiWarehouseImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="DSCustomer.jar"/>
+                                        <property name="manifest.file.name" value="osgi/ds/Customer.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/customer/Customer.class \
+                                                    osgi/ds/Customer.xml \
+                                                    supplychain/customer/OSGiCustomerComponentImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="DSRetailer.jar"/>
+                                        <property name="manifest.file.name" value="osgi/ds/Retailer.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/retailer/Retailer.class \
+                                                    osgi/ds/Retailer.xml \
+                                                    supplychain/retailer/OSGiRetailerComponentImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="DSShipper.jar"/>
+                                        <property name="manifest.file.name" value="osgi/ds/Shipper.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/shipper/Shipper.class \
+                                                    osgi/ds/Shipper.xml \
+                                                    supplychain/shipper/OSGiShipperComponentImpl.class"/>
+              
+                                    </ant>
+                                    <ant antfile="./build-bundles.xml" target="create-bundles">
+                                        <property name="jar.dir" value="target"/>
+                                        <property name="files.dir" value="target/classes"/>
+                                        <property name="jar.file.name" value="DSWarehouse.jar"/>
+                                        <property name="manifest.file.name" value="osgi/ds/Warehouse.mf"/>
+                                        <property name="files.list" 
+                                             value="supplychain/warehouse/Warehouse.class \
+                                                    osgi/ds/Warehouse.xml \
+                                                    supplychain/warehouse/OSGiWarehouseComponentImpl.class"/>
+              
+                                    </ant>
+                                </tasks>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+    </build>
+</project>

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm Wed Jun 20 08:28:00 2007
@@ -0,0 +1,332 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ -->
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <title>Tuscany Supply Chain</title>
+<!-- LINK rel="stylesheet" href="ait.css" type="text/css" -->
+  <style type="text/css" media="all">
+@import url("../../../../css/maven-base.css");
+@import url("../../../../css/maven-theme.css");
+@import url("../../../../css/site.css");
+  </style>
+  <link rel="stylesheet" href="./css/print.css" type="text/css"
+ media="print">
+</head>
+<body>
+<h2>Tuscany
+Supply Chain Sample using OSGi<br>
+</h2>
+<h3>Overview</h3>
+<p>The Tuscany OSGi supply chain sample shows using the Tuscany SCA
+runtime in a J2SE environment&nbsp;executing the SCA asynchronous API
+with OSGi and Java implementation types.</p>
+<h3>Location</h3>
+This
+sample is located &nbsp;in the samples\osgi-supplychain directory.<br>
+<h3>Setup</h3>
+This sample depends on the Tuscany runtime
+and the sample jar, <span style="font-weight: bold;"></span>both of
+these must be available on the classpath to run the sample.
+<h3>Running</h3>
+In the directory&nbsp;samples\osgi-supplychain
+use the JDK 1.5 java command to run the class <span
+ style="font-weight: bold;">supplychain.SupplyChainClient</span>
+<pre>Linux: java -cp ../../../lib/tuscany-runtime-incubating-M1.jar:target/sample-osgi-supplychain-incubating-M1.jar supplychain.SupplyChainClient</pre>
+<pre>Windows: java -cp ../../../lib/tuscany-runtime-incubating-M1.jar;target/sample-osgi-supplychain-incubating-M1.jar supplychain.SupplyChainClient</pre>
+<h3>Results</h3>
+<p>The sample when run should simply display on the standard output
+some startup messages followed by:<br>
+<br>
+Work thread Thread[Thread-1,5,main]
+- <span style="font-weight: bold;">Order, submitted, fulfilled, shipped</span><code></code></p>
+<h3>Code Overview</h3>
+The source files are physically organized as shown below:
+<table style="text-align: left; width: 100%;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td>src<br>
++---main<br>
+&nbsp;&nbsp;&nbsp;
++---java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp; +---supplychain<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OSGiBundleImpl.java<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SupplyChainClient.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---customer<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
+&nbsp; &nbsp;
+Customer.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+JavaCustomerComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiCustomerComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiCustomerImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---retailer<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
+&nbsp; &nbsp;
+Retailer.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+JavaRetailerComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiRetailerComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiRetailerImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---shipper<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Shipper.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+JavaShipperComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiShipperComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiShipperImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---warehouse<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Warehouse.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+JavaWarehouseComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiWarehouseComponentImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+OSGiWarehouseImpl.java<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;<br>
+&nbsp;&nbsp;&nbsp; +---resources<br>
+&nbsp;&nbsp;&nbsp;
+&brvbar;&nbsp;&nbsp; +---osgi<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customer.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Retailer.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Shipper.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Warehouse.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
++---ds<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp; &nbsp; &nbsp; Customer.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
+&nbsp; &nbsp;&nbsp; Retailer.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Shipper.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Warehouse.mf<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp; &nbsp; &nbsp; Customer.xml<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
+&nbsp; &nbsp;&nbsp; Retailer.xml<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Shipper.xml<br>
+&nbsp;&nbsp;&nbsp; &brvbar;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Warehouse.xml<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+Customer.componentType<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+Retailer.componentType<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+Shipper.componentType<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+Warehouse.componentType<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+supplychain.composite<br>
+&nbsp;&nbsp;&nbsp; &brvbar; &nbsp;&nbsp;&nbsp;&nbsp;
+supplychain.ds.composite<br>
+&nbsp;&nbsp; <br>
+      <br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<table style="text-align: left; width: 879px; height: 154px;" border="0"
+ cellpadding="2" cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;">Customer.java</td>
+      <td>Defines the Java interface implemented by the Customer
+component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">JavaCustomerComponentImpl.java</td>
+      <td>POJO Implementation of the SCA Customer component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiCustomerComponentImpl.java</td>
+      <td style="vertical-align: top;">OSGi Declarative Services
+Implementation of the SCA Customer component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiCustomerImpl.java</td>
+      <td style="vertical-align: top;">OSGi Procedural Services
+Implementation of the SCA Customer component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">Retailer.java</td>
+      <td>Defines the Java interface implemented by the Retailer
+component.</td>
+    </tr>
+    <tr>
+      <td>JavaRetailerComponentImpl.java</td>
+      <td>POJO Implementation of&nbsp; the SCA&nbsp;RetailerComponent
+component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiRetailerComponentImpl.java</td>
+      <td style="vertical-align: top;">OSGi Declarative Services
+Implementation of the SCA Retailer component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiRetailerImpl.java</td>
+      <td style="vertical-align: top;">OSGi Procedural Services
+Implementation of the SCA Retailer component.</td>
+    </tr>
+    <tr>
+      <td>Shipper.java</td>
+      <td>Defines
+the Java interface implemented by the&nbsp;Shipper component</td>
+    </tr>
+    <tr>
+      <td>JavaShipperComponentImpl.java</td>
+      <td>POJO Implementation of the SCA&nbsp;ShipperComponent
+component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiShipperComponentImpl.java</td>
+      <td style="vertical-align: top;">OSGi Declarative Services
+Implementation of the SCA Shipper component.</td>
+    </tr>
+    <tr>
+      <td>OSGiShipperImpl.java</td>
+      <td>OSGi Procedural Services Implementation of the SCA Shipper
+component.</td>
+    </tr>
+    <tr>
+      <td>Warehouse.java</td>
+      <td>Defines
+the Java interface implemented by the&nbsp;Warehouse component.</td>
+    </tr>
+    <tr>
+      <td>JavaWarehouseComponentImpl.java</td>
+      <td>POJO Implementation of the SCA&nbsp;WarehouseComponent
+component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiWarehouseComponentImpl.java</td>
+      <td style="vertical-align: top;">OSGi Declarative Services
+Implementation of the SCA Warehouse component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiWarehouseImpl.java</td>
+      <td style="vertical-align: top;">OSGi Procedural Services
+Implementation of the SCA Warehouse component.</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">OSGiBundleImpl.java<br>
+      </td>
+      <td style="vertical-align: top;">Common code for OSGi Procedural
+Services Implementation of the SCA components<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">SupplyChainClient.java</td>
+      <td style="vertical-align: top;">SupplyChainClient.java
+loads SCA runtime <br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">SupplyChainClientTestCase.java</td>
+      <td style="vertical-align: top;">JUnit test for this sample<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/osgi/*.mf<br>
+      </td>
+      <td style="vertical-align: top;">Manifest files for OSGi bundles
+for OSGi procedural services implementation<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/osgi/ds/*.mf</td>
+      <td style="vertical-align: top;">Manifest files for OSGi bundles
+for OSGi declarative services implementation</td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/osgi/ds/*.xml</td>
+      <td style="vertical-align: top;">OSGi Declarative services
+component xml files<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/*.componentType<br>
+      </td>
+      <td style="vertical-align: top;">Component types used by OSGi
+implementation provider for SCA<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/supplychain.composite<br>
+      </td>
+      <td style="vertical-align: top;">Composite file using OSGi and
+Java implementation types<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">resources/supplychain.ds.composite</td>
+      <td style="vertical-align: top;">Composite file using OSGi
+(declarative services) and Java implementation types <br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+</body>
+</html>

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/readme.htm
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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;
+
+
+import java.lang.reflect.Field;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+
+
+/**
+ * Common code for all OSGi bundles which dont use declarative services.
+ * Registers services and sets references.
+ */
+public class OSGiBundleImpl implements ServiceListener, BundleActivator {
+    
+
+    String name;
+    String serviceName;
+    String[] references;
+    Class<?>[] referenceClasses;
+    Field[] referenceFields;
+    
+    Class myClass;
+    
+	private BundleContext bundleContext;
+    
+    public OSGiBundleImpl(String serviceName, String... references) {
+        
+        System.out.println("Created " + this.getClass().getSimpleName());
+        
+        myClass = this.getClass();
+        this.name = this.getClass().getSimpleName();
+        this.serviceName = serviceName;
+        this.references = references;
+        
+        try {
+            referenceClasses = new Class[references.length];
+            referenceFields = new Field[references.length];
+            for (int i = 0; i < references.length; i++) {
+                referenceFields[i] = this.getClass().getDeclaredField(references[i]);
+                referenceFields[i].setAccessible(true);
+                referenceClasses[i] = referenceFields[i].getType();
+            }
+            
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        
+    }
+    
+    public void start(BundleContext bc) {
+    	
+    	System.out.println("Started bundle " + name);
+    	
+    	this.bundleContext = bc;
+    	
+        bundleContext.registerService(serviceName, this, new Hashtable());
+        
+        for (int i = 0; i < references.length; i++) {
+
+            try {
+                
+    	        ServiceReference ref = bundleContext.getServiceReference(referenceClasses[i].getName());
+	            if (ref != null) {
+                    Object obj = bundleContext.getService(ref);
+                    referenceFields[i].set(this, referenceClasses[i].cast(obj));
+                } else {
+				    String filter = "(objectclass=" + referenceClasses[i].getName() + ")";
+				    this.bundleContext.addServiceListener(this, filter);				
+	            }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+    
+    public void stop(BundleContext bc)  {
+        System.out.println("Stop bundle " + name);
+
+    }
+    
+
+	public void serviceChanged(ServiceEvent event) {
+		try {
+			if (event.getType() == ServiceEvent.REGISTERED) {
+                
+                ServiceReference ref = event.getServiceReference();
+                Object obj = bundleContext.getService(ref);
+                for (int i = 0; i < references.length; i++) {
+                    if (referenceClasses[i].isAssignableFrom(obj.getClass())) {
+                        referenceFields[i].set(this, referenceClasses[i].cast(obj));
+                    }
+                }
+			}
+		} catch (Throwable e) {
+			e.printStackTrace();
+		}
+	}
+    
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+import supplychain.customer.Customer;
+
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * locate a Customer service component and invoke it.
+ */
+public class SupplyChainClient {
+
+    public static final void main(String[] args) throws Exception {
+        SCADomain scaDomain = SCADomain.newInstance("supplychain.composite");
+        Customer customer = scaDomain.getService(Customer.class, "CustomerComponent");
+
+        System.out.println("Main thread " + Thread.currentThread());
+        customer.purchaseGoods();
+        System.out.println("Main thread sleeping ...");
+        Thread.sleep(1000);
+
+        scaDomain.close();
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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);
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 Retailer retailer;
+    
+    @Reference
+    public void setRetailer(Retailer retailer) {
+        this.retailer = retailer;
+    }
+    
+    public void purchaseGoods() {
+        System.out.println("Customer.purchaseGoods, retailer is " + retailer);
+        retailer.submitOrder("Order");
+    }
+    
+    public void notifyShipment(String order) {
+        System.out.print("Work thread " + Thread.currentThread() + " - ");
+        System.out.println(order);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -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 supplychain.customer;
+
+
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component (OSGi declarative services implementation).
+ */
+public class OSGiCustomerComponentImpl implements Customer {
+    
+
+    private Retailer retailer;
+    
+   
+    protected void setRetailer(Retailer retailer) {
+    	this.retailer = retailer;
+    }
+    
+    protected void unsetRetailer(Retailer retailer) {
+    	this.retailer = null;
+    }
+   
+    public void purchaseGoods() {
+    	System.out.println("Customer.purchaseGoods, retailer is " + retailer);
+        retailer.submitOrder("Order");
+    }
+    
+    public void notifyShipment(String order) {
+        System.out.print("Work thread " + Thread.currentThread() + " - ");
+        System.out.println(order);
+    }
+    
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.OSGiBundleImpl;
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component (OSGi procedural services implementation).
+ */
+public class OSGiCustomerImpl extends OSGiBundleImpl implements Customer {
+    
+    private Retailer retailer;
+    
+    public OSGiCustomerImpl() {
+        super("supplychain.customer.Customer", "retailer");
+                
+    }
+   
+    public void purchaseGoods() {
+        System.out.println("Customer.purchaseGoods, retailer is " + retailer);
+        retailer.submitOrder("Order");
+    }
+    
+    public void notifyShipment(String order) {
+        System.out.print("Work thread " + Thread.currentThread() + " - ");
+        System.out.println(order);
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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;
+    
+    
+    @Reference
+    public void setWarehouse(Warehouse warehouse) {
+        this.warehouse = warehouse;
+    }
+    
+       
+    public void submitOrder(String order) {
+    	
+    	System.out.println("Retailer.submitOrder, warehouse is " + warehouse);
+        warehouse.fulfillOrder(order + ", submitted");
+        
+    }
+
+    
+    
+   
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -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 supplychain.retailer;
+
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Retailer service component (OSGi declarative services implementation).
+ */
+public class OSGiRetailerComponentImpl implements Retailer {
+    
+    private Warehouse warehouse;
+    
+    
+    protected void setWarehouse(Warehouse warehouse) {
+    	this.warehouse = warehouse;
+    }
+    
+    protected void unsetWarehouse(Warehouse warehouse) {
+    	this.warehouse = null;
+    }
+    
+    public void submitOrder(String order) {
+    	
+    	System.out.println("Retailer.submitOrder, warehouse is" + warehouse);
+        warehouse.fulfillOrder(order + ", submitted");
+       
+    }
+
+   
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.OSGiBundleImpl;
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Retailer service component (OSGi procedural services implementation).
+ */
+public class OSGiRetailerImpl extends OSGiBundleImpl implements Retailer {
+    
+    private Warehouse warehouse;
+    
+    public OSGiRetailerImpl() {
+
+        super("supplychain.retailer.Retailer", "warehouse");
+    }
+    
+    public void submitOrder(String order) {
+    	
+    	System.out.println("Retailer.submitOrder, warehouse is " + warehouse);
+        warehouse.fulfillOrder(order + ", submitted");        
+        
+    }
+
+    
+   
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java Wed Jun 20 08:28:00 2007
@@ -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 supplychain.retailer;
+
+/**
+ * This is the business interface of the Retailer service component.
+ */
+public interface Retailer {
+    
+    public void submitOrder(String order);
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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;
+    
+    @Reference
+    public void setCustomer(Customer customer) {
+        this.customer = customer;
+    }
+    
+    public void processShipment(String order) {
+    	System.out.println("Shipper.processShipment, customer is " + customer);
+        customer.notifyShipment(order + ", shipped");
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component (OSGi declarative services implementation).
+ */
+public class OSGiShipperComponentImpl implements Shipper {
+
+    private Customer customer;
+    
+    
+    protected void setCustomer(Customer customer) {
+    	this.customer = customer;
+    }
+    
+    protected void unsetCustomer(Customer customer) {
+    	this.customer = null;
+    }
+    
+    public void processShipment(String order) {
+    	System.out.println("Shipper.processShipment, customer is " + customer);
+        customer.notifyShipment(order + ", shipped");
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.OSGiBundleImpl;
+import supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component (OSGi procedural services implementation).
+ */
+public class OSGiShipperImpl extends OSGiBundleImpl implements Shipper {
+
+    private Customer customer;
+    
+    public OSGiShipperImpl() {
+    	super("supplychain.shipper.Shipper", "customer");
+    }
+    
+    
+    public void processShipment(String order) {
+    	System.out.println("Shipper.processShipment, customer is " + customer);
+        customer.notifyShipment(order + ", shipped");
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java Wed Jun 20 08:28:00 2007
@@ -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 supplychain.shipper;
+
+/**
+ * This is the business interface of the Shipper service component.
+ */
+public interface Shipper {
+    
+    public void processShipment(String order);
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component (POJO implementation).
+ */
+@Service(Warehouse.class)
+@Scope("STATELESS")
+public class JavaWarehouseComponentImpl implements Warehouse {
+    
+    private Shipper shipper;
+    
+    
+    @Reference
+    public void setShipper(Shipper shipper) {
+        this.shipper = shipper;
+    }
+    
+    public void fulfillOrder(String order) {
+    	System.out.println("Warehouse.fulfillOrder : shipper is " + shipper);
+        
+        shipper.processShipment(order + ", fulfilled");
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component (OSGi declarative services implementation).
+ */
+
+public class OSGiWarehouseComponentImpl implements Warehouse {
+    
+    private Shipper shipper;
+    
+   
+    protected void setShipper(Shipper shipper) {
+    	this.shipper = shipper;
+    }
+    
+    protected void unsetShipper(Shipper shipper) {
+    	this.shipper = null;
+    }
+    
+    public void fulfillOrder(String order) {
+    	System.out.println("Warehouse.fulfillOrder : shipper is " + shipper);
+        	
+        shipper.processShipment(order + ", fulfilled");
+    	
+    }
+    
+   
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java Wed Jun 20 08:28:00 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 supplychain.OSGiBundleImpl;
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service componentm (OSGi procedural services implementation).
+ */
+
+public class OSGiWarehouseImpl extends OSGiBundleImpl implements Warehouse {
+    
+    private Shipper shipper;
+    
+    public OSGiWarehouseImpl() {
+    	super("supplychain.warehouse.Warehouse", "shipper");
+    }
+    
+    
+    public void fulfillOrder(String order) {
+    	System.out.println("Warehouse.fulfillOrder : shipper is " + shipper);
+        	
+        shipper.processShipment(order + ", fulfilled");
+    	
+    }
+    
+   
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java Wed Jun 20 08:28:00 2007
@@ -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 supplychain.warehouse;
+
+/**
+ * This is the business interface of the Warehouse service component.
+ */
+public interface Warehouse {
+    
+    public void fulfillOrder(String order);
+
+}

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType?view=auto&rev=549133
==============================================================================
--- incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType (added)
+++ incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType Wed Jun 20 08:28:00 2007
@@ -0,0 +1,28 @@
+<?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="supplychain.customer.Customer">
+        <interface.java interface="supplychain.customer.Customer"/>
+    </service>
+    <reference name="retailer">
+            <interface.java interface="supplychain.retailer.Retailer"/>
+    </reference>
+    
+</componentType>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/osgi-supplychain/src/main/resources/Customer.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message