You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/06/25 10:56:52 UTC

svn commit: r550418 - in /incubator/tuscany/java/sca/samples: simple-bigbank/src/main/java/bigbank/account/ simple-bigbank/src/main/java/bigbank/accountdata/ simple-bigbank/src/main/java/bigbank/stockquote/ spring-bigbank/ spring-bigbank/src/ spring-bi...

Author: jsdelfino
Date: Mon Jun 25 01:56:49 2007
New Revision: 550418

URL: http://svn.apache.org/viewvc?view=rev&rev=550418
Log:
Added a Spring-based version of the simple-bigbank sample. Minor changes to simple-bigbank as well to make it easier to compare the two versions of the sample.

Added:
    incubator/tuscany/java/sca/samples/spring-bigbank/
    incubator/tuscany/java/sca/samples/spring-bigbank/README   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/build.xml   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/pom.xml   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.png   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.svg
    incubator/tuscany/java/sca/samples/spring-bigbank/src/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite   (with props)
    incubator/tuscany/java/sca/samples/spring-bigbank/src/test/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/
    incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java   (with props)
Modified:
    incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
    incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
    incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
    incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java

Modified: incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java?view=diff&rev=550418&r1=550417&r2=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java (original)
+++ incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java Mon Jun 25 01:56:49 2007
@@ -23,7 +23,6 @@
 
 import org.osoa.sca.annotations.Property;
 import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
 
 import bigbank.accountdata.AccountDataService;
 import bigbank.accountdata.CheckingAccount;
@@ -34,7 +33,6 @@
 /**
  * Account service implementation
  */
-@Service(AccountService.class)
 public class AccountServiceImpl implements AccountService {
 
     @Reference
@@ -66,4 +64,5 @@
         
         return report;
     }
+
 }

Modified: incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java?view=diff&rev=550418&r1=550417&r2=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java (original)
+++ incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java Mon Jun 25 01:56:49 2007
@@ -18,12 +18,10 @@
  */
 package bigbank.accountdata;
 
-import org.osoa.sca.annotations.Service;
 
 /**
  * Account data service implementation
  */
-@Service(AccountDataService.class)
 public class AccountDataServiceImpl implements AccountDataService {
 
 	public CheckingAccount getCheckingAccount(String customerID) {

Modified: incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java?view=diff&rev=550418&r1=550417&r2=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java (original)
+++ incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java Mon Jun 25 01:56:49 2007
@@ -18,12 +18,10 @@
  */
 package bigbank.stockquote;
 
-import org.osoa.sca.annotations.Service;
 
 /**
  * This class implements the StockQuote service.
  */
-@Service(StockQuoteService.class)
 public class StockQuoteImpl implements StockQuoteService {
 
     public double getQuote(String symbol) {

Modified: incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java?view=diff&rev=550418&r1=550417&r2=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java (original)
+++ incubator/tuscany/java/sca/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java Mon Jun 25 01:56:49 2007
@@ -19,13 +19,12 @@
 package bigbank.stockquote;
 
 import org.osoa.sca.annotations.Remotable;
-import org.osoa.sca.annotations.Service;
+
 
 /**
  * This is the business interface of the StockQuote service.
  */
 @Remotable
-@Service
 public interface StockQuoteService {
 
     public double getQuote(String symbol);

Added: incubator/tuscany/java/sca/samples/spring-bigbank/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/README?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/README (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/README Mon Jun 25 01:56:49 2007
@@ -0,0 +1,91 @@
+Spring Bigbank Sample
+=================
+This sample implements a simple a version of the BigBank scenrio used in 
+various places in the SCA specification documents. 
+
+The README in the samples directory (the directory above this) provides 
+general instructions about building and running samples. Take a look there 
+first. 
+
+If you just want to run it to see what happens open a command prompt, navigate
+to this sample directory and do:
+
+ant run
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-spring-bigbank.jar bigbank.client.BigBankClient
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-spring-bigbank.jar bigbank.client.BigBankClient
+
+
+Sample Overview
+---------------
+The sample provides a composite with two java components wired together 
+with a default binding. A request to the AccountComponent results in a 
+request to the AccountDataComponent to get account data. The data returns 
+back via the AccountComponent to the client.
+
+calculator/
+  src/
+    main/
+      java/
+        bigbank/
+          account/                - AccountComponent implementation
+          accountdata/            - AccountDataComponent implementation
+          client/                 - starts the SCA Runtime and 
+                                    deploys the BigBank.composite. 
+                                    It then calls the deployed AccountService 
+      resources/
+        Account.composite         - SCA assembly for this sample
+        BigBank.composite         - SCA assembly for this sample
+        StockQuote.composite      - SCA assembly for this sample
+    test/
+      java/
+        bigbank/
+          BigBankTestCase.java    - JUnit test case 
+  spring-bigbank.png              - a pictorial representation of the sample 
+                                    .composite file
+  build.xml                       - the Ant build file
+  pom.xml                         - the Maven build file        
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built and run using Ant as 
+follows
+
+cd spring-bigbank
+ant compile
+ant run
+
+You should see the following output from the run target.
+
+run:
+     [java] Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID
+:Foo_SAA12345, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100]
+
+Building And Running The Sample Using Maven 
+-------------------------------------------
+With either the binary or source distributions the sample can be built and run 
+using Maven as follows. 
+
+cd spring-bigbank
+mvn
+
+You should see the following output from the test phase.
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running bigbank.BigBankTestCase
+Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID:Foo_SAA1234
+5, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balance:10432.0]]
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.592 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+This shows that the Junit test cases have run successfully. 

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/README
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/build.xml?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/build.xml (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/build.xml Mon Jun 25 01:56:49 2007
@@ -0,0 +1,72 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<project name="spring-bigbank" default="compile">
+    <property name="test.class" value="bigbank.client.BigBankClient" />
+	<property name="test.jar"   value="sample-spring-bigbank.jar" />
+	
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+	
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>    	
+    </target>	
+	
+    <target name="run-classes">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/classes"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>
+    </target>
+	
+    <target name="run">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/${test.jar}"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>    	
+    </target>
+	
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/pom.xml?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/pom.xml (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/pom.xml Mon Jun 25 01:56:49 2007
@@ -0,0 +1,72 @@
+<?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-spring-bigbank</artifactId>
+    <name>Apache Tuscany Simplified Spring-Based BigBank Sample</name>
+
+    <repositories>
+       <repository>
+          <id>apache.incubator</id>
+          <url>http://people.apache.org/repo/m2-incubating-repository</url>
+       </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-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-spring</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>${artifactId}</finalName>
+    </build>
+
+</project>

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

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

Added: incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.png
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.png?view=auto&rev=550418
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.svg
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.svg?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.svg (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/spring-bigbank.svg Mon Jun 25 01:56:49 2007
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1052.3622"
+   height="744.09448"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-bigbank"
+   sodipodi:docname="simple-bigbank.svg"
+   version="1.0"
+   inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-bigbank\simple-bigbank.png"
+   inkscape:export-xdpi="52.84"
+   inkscape:export-ydpi="52.84">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="468.4064"
+     inkscape:cy="414.63224"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1054"
+     inkscape:window-height="721"
+     inkscape:window-x="120"
+     inkscape:window-y="172" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g2997">
+      <rect
+         rx="15.307091"
+         ry="12.692303"
+         y="192.00233"
+         x="258.31146"
+         height="299.99988"
+         width="495.71429"
+         id="rect2067"
+         style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999964;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <flowRoot
+         id="flowRoot2954"
+         xml:space="preserve"><flowRegion
+           id="flowRegion2956"><rect
+             y="212.66591"
+             x="281.42856"
+             height="61.42857"
+             width="170"
+             id="rect2958" /></flowRegion><flowPara
+           id="flowPara2960">BigBank</flowPara></flowRoot>    </g>
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2988"
+       width="115.66247"
+       height="85.862968"
+       x="339.91632"
+       y="310.73904"
+       rx="6.9961648"
+       ry="7.1230249" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2966"
+       transform="translate(84.32554,112.8005)"><flowRegion
+         id="flowRegion2968"><rect
+           id="rect2970"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara2972">Account</flowPara><flowPara
+         id="flowPara1883">Service</flowPara><flowPara
+         id="flowPara1885">Component</flowPara></flowRoot>    <rect
+       style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3006"
+       width="43.861084"
+       height="29.993773"
+       x="376.59262"
+       y="285.79593"
+       rx="21.930542"
+       ry="0" />
+    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
+       id="path3017" />
+    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 436.01825,340.74775 L 469.35329,340.74775 L 475.4142,353.87973 L 468.34314,366.00157 L 436.01825,366.00157 L 443.5944,353.87973 L 436.01825,340.74775 z "
+       id="path3019" />
+    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 226.73063,330.75341 L 280.61512,330.75341 L 290.41229,356.14253 L 278.98226,379.57867 L 226.73063,379.57867 L 238.97711,356.14253 L 226.73063,330.75341 z "
+       id="path1887" />
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1889"
+       width="115.66247"
+       height="85.862968"
+       x="557.25488"
+       y="308.38455"
+       rx="6.9961648"
+       ry="7.1230249" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1891"
+       transform="translate(301.6641,110.446)"><flowRegion
+         id="flowRegion1893"><rect
+           id="rect1895"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara1897">Account</flowPara><flowPara
+         id="flowPara1909">Data</flowPara><flowPara
+         id="flowPara1899">Service</flowPara><flowPara
+         id="flowPara1901">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 540.10438,340.23154 L 573.43942,340.23154 L 579.50033,353.36352 L 572.42927,365.48536 L 540.10438,365.48536 L 547.68053,353.36352 L 540.10438,340.23154 z "
+       id="path1905" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 290,355.52305 C 329.28571,355.52305 329.28571,355.52305 329.28571,355.52305"
+       id="path1913" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 475,353.3802 C 547.14286,352.66591 547.14286,352.66591 547.14286,352.66591"
+       id="path1919" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1921"
+       transform="translate(95.23912,80.79069)"
+       style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion1923"><rect
+           id="rect1925"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara1931">currency</flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1933"
+       transform="translate(-42.61803,130.0764)"
+       style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion1935"><rect
+           id="rect1937"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara1939">Account</flowPara><flowPara
+         id="flowPara1941">Service</flowPara><flowPara
+         id="flowPara1943" /></flowRoot>  </g>
+</svg>

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 bigbank.account;
+
+import java.util.List;
+
+/**
+ */
+public class AccountReport {
+    private List<String> summaries;
+    private String currency;
+    
+    public AccountReport(String currency, List<String> summaries) {
+        this.currency = currency;
+        this.summaries = summaries;
+    }
+
+    public List getAccountSummaries() { return summaries; }
+    
+    public String getCurrency() { return currency; }
+    
+    public String toString() {
+        return "currency: "+ currency + ", " + summaries;
+    }
+    
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountReport.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java Mon Jun 25 01:56:49 2007
@@ -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 bigbank.account;
+
+/**
+ * Interface for a account service
+ */
+public interface AccountService {
+    public AccountReport getAccountReport(String customerID);
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 bigbank.account;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import bigbank.accountdata.AccountDataService;
+import bigbank.accountdata.CheckingAccount;
+import bigbank.accountdata.SavingsAccount;
+import bigbank.accountdata.StockAccount;
+import bigbank.stockquote.StockQuoteService;
+
+/**
+ * Account service implementation
+ */
+public class AccountServiceImpl implements AccountService {
+
+    private AccountDataService accountDataService;
+    
+    private StockQuoteService stockQuoteService;
+    
+    private String currency;
+
+    public AccountReport getAccountReport(String s) {
+        List<String> summaries = new ArrayList<String>();
+
+        CheckingAccount ca = accountDataService.getCheckingAccount(s);
+        summaries.add(ca.getSummary());
+
+        SavingsAccount sa = accountDataService.getSavingsAccount(s);
+        summaries.add(sa.getSummary());
+
+        StockAccount sk = accountDataService.getStockAccount(s);
+        
+        double price = stockQuoteService.getQuote(sk.getSymbol());
+        sk.setBalance(sk.getQuantity() * price);
+        
+        summaries.add(sk.getSummary());
+
+        AccountReport report = new AccountReport(currency, summaries);
+        
+        return report;
+    }
+
+    public AccountDataService getAccountDataService() {
+        return accountDataService;
+    }
+
+    public void setAccountDataService(AccountDataService accountDataService) {
+        this.accountDataService = accountDataService;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public StockQuoteService getStockQuoteService() {
+        return stockQuoteService;
+    }
+
+    public void setStockQuoteService(StockQuoteService stockQuoteService) {
+        this.stockQuoteService = stockQuoteService;
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java Mon Jun 25 01:56:49 2007
@@ -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 bigbank.accountdata;
+
+/**
+ * Interface for a account service
+ */
+public interface Account {
+    String getSummary();
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/Account.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java Mon Jun 25 01:56:49 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 bigbank.accountdata;
+
+/**
+ * Interface for a account data service
+ */
+public interface AccountDataService {
+    public CheckingAccount getCheckingAccount(String customerID);
+    public SavingsAccount getSavingsAccount(String customerID);
+    public StockAccount getStockAccount(String customerID);
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java Mon Jun 25 01:56:49 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 bigbank.accountdata;
+
+
+/**
+ * Account data service implementation
+ */
+public class AccountDataServiceImpl implements AccountDataService {
+
+	public CheckingAccount getCheckingAccount(String customerID) {
+
+		CheckingAccount checkingAccount = new CheckingAccount();
+		checkingAccount.setAccountNumber(customerID+"_"+"CHA12345");
+		checkingAccount.setBalance(1500.0f);
+
+		return checkingAccount;
+	}
+
+	public SavingsAccount getSavingsAccount(String customerID) {
+
+		SavingsAccount savingsAccount = new SavingsAccount();
+		savingsAccount.setAccountNumber(customerID+"_"+"SAA12345");
+		savingsAccount.setBalance(1500.0f);
+
+		return savingsAccount;
+	}
+
+	public StockAccount getStockAccount(String customerID) {
+
+		StockAccount stockAccount = new StockAccount();
+		stockAccount.setAccountNumber(customerID+"_"+"STA12345");
+		stockAccount.setSymbol("IBM");
+		stockAccount.setQuantity(100);
+
+		return stockAccount;
+	}
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package bigbank.accountdata;
+
+/**
+ * An account service implementation for a checking account
+ */
+public class CheckingAccount implements Account {
+    private String accountNumber;
+    private double balance;
+
+    public String getAccountNumber() { return accountNumber; }
+    public void setAccountNumber(String n) { this.accountNumber = n; }
+
+    public double getBalance() { return balance; }
+    public void setBalance(double b) { this.balance = b; }
+
+    public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; }
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package bigbank.accountdata;
+
+/**
+ * An account service implementation for a savings account
+ */
+public class SavingsAccount implements Account {
+    private String accountNumber;
+    private double balance;
+
+    public String getAccountNumber() { return accountNumber; }
+    public void setAccountNumber(String n) { this.accountNumber = n; }
+
+    public double getBalance() { return balance; }
+    public void setBalance(double b) { this.balance = b; }
+
+    public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; }    
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java Mon Jun 25 01:56:49 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 bigbank.accountdata;
+
+/**
+ * An account service implementation for a stock account
+ */
+public class StockAccount implements Account {
+    private String accountNumber;
+    private String symbol;
+    private int quantity;
+    private double balance;
+
+    public String getAccountNumber() { return accountNumber; }
+    public void setAccountNumber(String n) { this.accountNumber = n; }
+
+    public double getQuantity() { return quantity; }
+    public void setQuantity(int a) { this.quantity = a; }
+
+    public String getSymbol() { return symbol; }
+    public void setSymbol(String s) { this.symbol = s; }
+    
+    public double getBalance() { return balance; }
+    public void setBalance(double balance) { this.balance = balance; }
+
+    public String getSummary() { return "ID:" + accountNumber + ", symbol:" + symbol + ", quantity:" + quantity + ", balance:" + balance; }
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/accountdata/StockAccount.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java Mon Jun 25 01:56:49 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 bigbank.client;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+import bigbank.account.AccountService;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class BigBankClient {
+    public static void main(String[] args) throws Exception {
+
+        SCADomain scaDomain = SCADomain.newInstance("BigBank.composite");
+        
+        AccountService accountService = scaDomain.getService(AccountService.class,
+                                                          "AccountServiceComponent");
+
+        System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
+
+        scaDomain.close();
+    }  
+
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/client/BigBankClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 bigbank.stockquote;
+
+
+/**
+ * This class implements the StockQuote service.
+ */
+public class StockQuoteImpl implements StockQuoteService {
+
+    public double getQuote(String symbol) {
+        double price = 104.0 + Math.random();
+        price = ((int)(price * 100)) / 100.0;
+
+        System.out.println("Getting stock quote for: " + symbol + ", value: "+ price);
+
+        return price;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java Mon Jun 25 01:56:49 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package bigbank.stockquote;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the StockQuote service.
+ */
+@Remotable
+public interface StockQuoteService {
+
+    public double getQuote(String symbol);
+}
+

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml Mon Jun 25 01:56:49 2007
@@ -0,0 +1,36 @@
+<?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.    
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:sca="http://www.springframework.org/schema/sca"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.springframework.org/schema/sca/spring-sca.xsd">
+
+    <bean id="AccountServiceBean" class="bigbank.account.AccountServiceImpl">
+        <property name="accountDataService" ref="AccountDataServiceBean"/>
+        <property name="stockQuoteService" ref="stockQuoteService"/>
+        <property name="currency" value="USD"/>
+    </bean>
+
+    <bean id="AccountDataServiceBean" class="bigbank.accountdata.AccountDataServiceImpl">
+    </bean>
+
+</beans>

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/Account-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite Mon Jun 25 01:56:49 2007
@@ -0,0 +1,34 @@
+<?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://bigbank"
+	xmlns:s="http://stockquote"
+	name="BigBank">
+
+    <component name="AccountServiceComponent">
+        <implementation.spring location="Account-context.xml"/>
+        <reference name="stockQuoteService" target="StockQuoteServiceComponent"/>
+    </component>
+
+    <component name="StockQuoteServiceComponent">
+        <implementation.composite name="s:StockQuote"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/BigBank.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite Mon Jun 25 01:56:49 2007
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://stockquote"
+    name="StockQuote">
+
+    <service name="StockQuoteService" promote="StockQuoteServiceComponent"/>
+
+    <component name="StockQuoteServiceComponent">
+        <implementation.java class="bigbank.stockquote.StockQuoteImpl" />
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/main/resources/StockQuote.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java?view=auto&rev=550418
==============================================================================
--- incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java (added)
+++ incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java Mon Jun 25 01:56:49 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 bigbank;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+import bigbank.account.AccountService;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class BigBankTestCase extends TestCase {
+
+    private SCADomain scaDomain;
+    AccountService accountService;
+
+    protected void setUp() throws Exception {
+        scaDomain = SCADomain.newInstance("BigBank.composite");
+        accountService = scaDomain.getService(AccountService.class, "AccountServiceComponent");
+    }
+    
+    protected void tearDown() throws Exception {
+        scaDomain.close();
+    }
+
+    public void test() throws Exception {
+        System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/spring-bigbank/src/test/java/bigbank/BigBankTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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