You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2008/08/07 13:44:49 UTC

svn commit: r683591 - in /tuscany/java/sca/samples/simple-bigbank-spring: ./ src/main/java/bigbank/account/ src/main/java/bigbank/account/checking/ src/main/java/bigbank/account/savings/ src/main/java/bigbank/account/stock/ src/main/java/bigbank/accoun...

Author: antelder
Date: Thu Aug  7 04:44:48 2008
New Revision: 683591

URL: http://svn.apache.org/viewvc?rev=683591&view=rev
Log:
Apply patch from Ramkumar Ramalingam for TUSCANY-2517: Extending simple-bigbank-spring sample - Step 1

Added:
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/CheckingsAccount.composite
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml
Removed:
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/Account.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataService.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/CheckingAccount.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/SavingsAccount.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/StockAccount.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/Account-spring-context.xml
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockQuote.composite
Modified:
    tuscany/java/sca/samples/simple-bigbank-spring/pom.xml
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java
    tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/BigBank.composite
    tuscany/java/sca/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java

Modified: tuscany/java/sca/samples/simple-bigbank-spring/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/pom.xml?rev=683591&r1=683590&r2=683591&view=diff
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/pom.xml (original)
+++ tuscany/java/sca/samples/simple-bigbank-spring/pom.xml Thu Aug  7 04:44:48 2008
@@ -55,6 +55,47 @@
             <version>1.4-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rmi</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jms-runtime</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-tomcat</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>apache-activemq</artifactId>
+            <version>4.1.1</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.activemq</groupId>
+                    <artifactId>activemq-web-demo</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
 
         <dependency>
             <groupId>junit</groupId>

Modified: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java?rev=683591&r1=683590&r2=683591&view=diff
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java (original)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java Thu Aug  7 04:44:48 2008
@@ -21,50 +21,99 @@
 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.account.checking.CheckingAccountDetails;
+import bigbank.account.checking.CheckingAccountService;
+import bigbank.account.savings.SavingsAccountDetails;
+import bigbank.account.savings.SavingsAccountService;
+import bigbank.account.stock.StockAccountDetails;
+import bigbank.account.stock.StockAccountService;
 import bigbank.stockquote.StockQuoteService;
+import bigbank.calculator.CalculatorService;
 
 /**
  * Account service implementation
  */
 public class AccountServiceImpl implements AccountService {
 
-    private AccountDataService accountDataService;
+    private SavingsAccountService savingsAccountService;
+    
+    private CheckingAccountService checkingAccountService;
+    
+    private StockAccountService stockAccountService;
+    
+    private CalculatorService calculatorService;
     
     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());
+    public AccountReport getAccountReport(String customerID) {
 
-        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());
+        // Get the checking, savings and stock accounts from the AccountData
+        // service component
+        CheckingAccountDetails checking = null;
+        List<String> summaries = new ArrayList<String>();
+        try {
+            checking = checkingAccountService.getAccountDetails(customerID);
+            System.out.println("Checking account: " + checking);
+            summaries.add(checking.toString());
+
+            SavingsAccountDetails savings = savingsAccountService.getAccountDetails(customerID);
+            System.out.println("Savings account: " + savings);
+            summaries.add(savings.toString());
+
+            StockAccountDetails stock = stockAccountService.getAccountDetails(customerID);
+            System.out.println("Stock account: " + stock);
+            summaries.add(stock.toString());
+            
+            // Get the stock price in USD
+            double price = stockQuoteService.getQuote(stock.getSymbol());
+            System.out.println("Stock price for " + stock.getSymbol() + ": " + price);
+            
+            // Convert to the configured currency
+            if (currency.equals("EURO")) {
+                
+                // Use our fancy calculator service to convert to the target currency
+                price = calculatorService.multiply(price, 0.70);
+                
+                System.out.println("Converted to " + currency + ": " + price);
+            }       
+              
+            // Calculate the value of the stock account
+            double stockValue = price * stock.getQuantity();
+            summaries.add(stock.toString());
+            
+            AccountReport report = new AccountReport(currency, summaries);
+            
+            return report;
+        } catch ( Throwable e ) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+    
+    public SavingsAccountService getSavingsAccountService() {
+        return savingsAccountService;
+    }
 
-        AccountReport report = new AccountReport(currency, summaries);
-        
-        return report;
+    public void setSavingsAccountService(SavingsAccountService savingsAccountService) {
+        this.savingsAccountService = savingsAccountService;
+    }
+    
+    public CheckingAccountService getCheckingAccountService() {
+        return checkingAccountService;
     }
 
-    public AccountDataService getAccountDataService() {
-        return accountDataService;
+    public void setCheckingAccountService(CheckingAccountService checkingAccountService) {
+        this.checkingAccountService = checkingAccountService;
+    }
+    
+    public StockAccountService getStockAccountService() {
+        return stockAccountService;
     }
 
-    public void setAccountDataService(AccountDataService accountDataService) {
-        this.accountDataService = accountDataService;
+    public void setStockAccountService(StockAccountService stockAccountService) {
+        this.stockAccountService = stockAccountService;
     }
 
     public String getCurrency() {
@@ -74,6 +123,14 @@
     public void setCurrency(String currency) {
         this.currency = currency;
     }
+    
+    public CalculatorService getCalculatorService() {
+        return calculatorService;
+    }
+
+    public void setCalculatorService(CalculatorService calculatorService) {
+        this.calculatorService = calculatorService;
+    }
 
     public StockQuoteService getStockQuoteService() {
         return stockQuoteService;

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.checking;
+
+public class CheckingAccountDetails {
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return accountNumber + ", balance:" + balance;
+    }
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.checking;
+
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
+@Service
+@Remotable
+public interface CheckingAccountService {
+    
+    public CheckingAccountDetails getAccountDetails(String customerID);
+    
+    public double deposit(String accountNo, double depositAmt);
+    
+    public double withdraw(String accountNo, double withdrawalAmount);
+    
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java Thu Aug  7 04:44:48 2008
@@ -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 bigbank.account.savings;
+
+import java.io.Serializable;
+
+public class SavingsAccountDetails implements Serializable {
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return accountNumber + ", balance:" + balance;
+    }
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.savings;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface SavingsAccountService {
+    
+    public SavingsAccountDetails getAccountDetails(String customerID);
+    
+    public double deposit(String accountNo, double depositAmt);
+    
+    public double withdraw(String accountNo, double withdrawalAmount);
+    
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.savings;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.osoa.sca.annotations.Service;
+
+@Service(SavingsAccountService.class)
+public class SavingsAccountServiceImpl implements SavingsAccountService {
+    private Map<String, String> custAcctMap = new HashMap<String, String>();
+    private Map<String, Double> savingsAccts = new HashMap<String, Double>();
+    
+    public SavingsAccountServiceImpl() {
+        custAcctMap.put("Customer_01", "SVA_Customer_01");
+        custAcctMap.put("Customer_02", "SVA_Customer_02");
+        custAcctMap.put("Customer_03", "SVA_Customer_03");
+        
+        savingsAccts.put("SVA_Customer_01", new Double(1000));
+        savingsAccts.put("SVA_Customer_02", new Double(1500));
+        savingsAccts.put("SVA_Customer_03", new Double(2000));
+    }
+    
+	public double deposit(String accountNo, double depositAmt) {
+        savingsAccts.put(accountNo, new Double(savingsAccts.get(accountNo).doubleValue() + depositAmt));
+        return savingsAccts.get(accountNo).doubleValue();
+    }
+
+    public SavingsAccountDetails getAccountDetails(String customerID) {
+        SavingsAccountDetails savingsAccount = new SavingsAccountDetails();
+        savingsAccount.setAccountNumber(custAcctMap.get(customerID));
+        savingsAccount.setBalance(savingsAccts.get(savingsAccount.getAccountNumber()).doubleValue());
+
+        return savingsAccount;
+    }
+
+    public double withdraw(String accountNo, double withdrawalAmount) {
+        double balance = savingsAccts.get(accountNo).doubleValue();
+        if ( balance - withdrawalAmount > 0 ) {
+            balance = balance - withdrawalAmount;
+            savingsAccts.put(accountNo, balance);
+        }
+        return balance;
+    }
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.stock;
+
+public class StockAccountDetails {
+    private String accountNumber;
+    private String symbol;
+    private int quantity;
+    
+    public StockAccountDetails() {
+    }
+    
+    public StockAccountDetails(String acNo, String symbol, int qty) {
+        this.accountNumber = acNo;
+        this.symbol = symbol;
+        this.quantity = qty;
+    }
+    
+    public String getAccountNumber() {
+        return accountNumber;
+    }
+
+    public void setAccountNumber(String n) {
+        this.accountNumber = n;
+    }
+
+    public int getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(int a) {
+        this.quantity = a;
+    }
+
+    public String getSymbol() {
+        return symbol;
+    }
+
+    public void setSymbol(String s) {
+        this.symbol = s;
+    }
+
+    @Override
+    public String toString() {
+        return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity;
+    }
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java Thu Aug  7 04:44:48 2008
@@ -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 bigbank.account.stock;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface StockAccountService {
+    
+    public StockAccountDetails getAccountDetails(String customerID);
+    
+    public StockAccountDetails buy(String accountNo, String symbol, int quantity);
+    
+    public StockAccountDetails sell(String accountNo, String symbol, int quantity);
+    
+    
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.stock;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.osoa.sca.annotations.Service;
+
+@Service(StockAccountService.class)
+public class StockAccountServiceImpl implements StockAccountService {
+    private Map<String, String> custAcctMap = new HashMap<String, String>();
+    private Map<String, StockAccountDetails> stockAccts = new HashMap<String, StockAccountDetails>();
+    
+    public StockAccountServiceImpl() {
+        custAcctMap.put("Customer_01", "STA_Customer_01");
+        custAcctMap.put("Customer_02", "STA_Customer_02");
+        custAcctMap.put("Customer_03", "STA_Customer_03");
+        
+        stockAccts.put("STA_Customer_01", new StockAccountDetails("STA_Customer_01", "IBM", 100));
+        stockAccts.put("STA_Customer_02", new StockAccountDetails("STA_Customer_02", "IBM", 200));
+        stockAccts.put("STA_Customer_03", new StockAccountDetails("STA_Customer_03", "SYM_3", 125));
+    }
+    
+    
+    public StockAccountDetails buy(String accountNo, String symbol, int quantity) {
+        return null;
+    }
+
+    public StockAccountDetails getAccountDetails(String customerID) {
+       return stockAccts.get(custAcctMap.get(customerID));
+    }
+
+    public StockAccountDetails sell(String accountNo, String symbol, int quantity) {
+        return null;
+    }
+    
+	
+    
+}

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java Thu Aug  7 04:44:48 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.calculator;
+
+/**
+ * The Calculator service interface.
+ */
+public interface CalculatorService {
+
+    double add(double n1, double n2);
+
+    double subtract(double n1, double n2);
+
+    double multiply(double n1, double n2);
+
+    double divide(double n1, double n2);
+
+}

Modified: tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java?rev=683591&r1=683590&r2=683591&view=diff
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java (original)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java Thu Aug  7 04:44:48 2008
@@ -35,7 +35,7 @@
         AccountService accountService = scaDomain.getService(AccountService.class,
                                                           "AccountServiceComponent");
 
-        System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
+        System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") );
 
         scaDomain.close();
     }  

Modified: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/BigBank.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/BigBank.composite?rev=683591&r1=683590&r2=683591&view=diff
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/BigBank.composite (original)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/BigBank.composite Thu Aug  7 04:44:48 2008
@@ -18,18 +18,54 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-	xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
-	targetNamespace="http://bigbank"
-	xmlns:s="http://stockquote"
-	name="BigBank">
+    xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+    targetNamespace="http://bigbank"
+    xmlns:bb="http://bigbank"
+    xmlns:bbsv="http://bigbank/savings"
+    xmlns:bbst="http://bigbank/stock"
+    xmlns:bbck="http://bigbank/checkings"
+    xmlns:s="http://stockquote"
+    name="BigBank">
 
     <component name="AccountServiceComponent">
-        <implementation.spring location="Account-spring-context.xml"/>
-        <reference name="stockQuoteService" target="StockQuoteServiceComponent"/>
+        <implementation.spring location="spring-context/Account-spring-context.xml"/>
+
+        <reference name="savingsAccountService" target="SavingsAccountServiceComponent"/>
+        
+        <!--reference name="checkingAccountService" target="CheckingAccountServiceComponent"/-->
+        <reference name="checkingAccountService">
+          <interface.java interface="bigbank.account.checking.CheckingAccountService"/>
+          <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+                       jndiURL="tcp://localhost:61619">
+              <destination name="RequestQueue" create="always"/>
+              <response>
+                  <destination name="ResponseQueue" create="always"/>
+              </response> 
+          </binding.jms>
+        </reference>
+        
+        <reference name="stockAccountService" target="StockAccountServiceComponent"/>
+        
+        <reference name="calculatorService">
+            <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/>
+        </reference>      
+        
+        <reference name="stockQuoteService">
+            <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/>
+        </reference>
+    </component>
+
+    <component name="SavingsAccountServiceComponent">
+        <implementation.composite name="bbsv:SavingsAccountDept"/>
     </component>
 
-    <component name="StockQuoteServiceComponent">
-        <implementation.composite name="s:StockQuote"/>
+    <!--component name="CheckingAccountServiceComponent">
+        <implementation.composite name="bbck:CheckingsAccountDept"/>
+    </component-->
+
+    <component name="StockAccountServiceComponent">
+        <implementation.composite name="bbst:StockAccountDept"/>
     </component>
 
 </composite>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/CheckingsAccount.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/CheckingsAccount.composite?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/CheckingsAccount.composite (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/CheckingsAccount.composite Thu Aug  7 04:44:48 2008
@@ -0,0 +1,33 @@
+<?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/checkings"
+	xmlns:bbck="http://bigbank/checkings"
+	xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+	xmlns:bba="http://bigbankAccount"
+	name="CheckingsAccountDept">
+	
+	<service name="CheckingAccountService" promote="CheckingAccountServiceComponent"/>
+	
+	<component name="CheckingAccountServiceComponent">
+        <implementation.spring location="spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml"/>
+    </component>
+    
+</composite>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite Thu Aug  7 04:44:48 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://bigbank/savings"
+	xmlns:bbsv="http://bigbank/savings"
+	xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+	name="SavingsAccountDept">
+
+    <service name="SavingsAccountService" promote="SavingsAccountServiceComponent"/>
+
+    <component name="SavingsAccountServiceComponent">
+        <implementation.spring location="spring-context/SavingsAccount-context.xml"/>
+    </component>
+
+</composite>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite Thu Aug  7 04:44:48 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://bigbank/stock"
+	xmlns:bbst="http://bigbank/stock"
+	xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+	name="StockAccountDept">
+
+    <service name="StockAccountService" promote="StockAccountServiceComponent"/>
+
+    <component name="StockAccountServiceComponent">
+        <implementation.spring location="spring-context/StockAccount/META-INF/spring/StockAccount-context.xml"/>
+    </component>
+
+</composite>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml Thu Aug  7 04:44:48 2008
@@ -0,0 +1,49 @@
+<?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">
+
+    <sca:service name="AccountService"
+        type="bigbank.account.AccountService" target="AccountServiceBean"/>
+
+    <bean id="AccountServiceBean" class="bigbank.account.AccountServiceImpl">
+        <property name="savingsAccountService" ref="savingsAccountService"/>
+        <property name="checkingAccountService" ref="checkingAccountService"/>
+        <property name="stockAccountService" ref="stockAccountService"/>
+        <property name="calculatorService" ref="calculatorService"/>
+        <property name="stockQuoteService" ref="stockQuoteService"/>        
+        <property name="currency" value="EURO"/>
+    </bean>
+
+    <sca:reference name="savingsAccountService" type="bigbank.account.savings.SavingsAccountService"/>
+    
+    <sca:reference name="checkingAccountService" type="bigbank.account.checking.CheckingAccountService"/>
+    
+    <sca:reference name="stockAccountService" type="bigbank.account.stock.StockAccountService"/>
+    
+    <sca:reference name="calculatorService" type="bigbank.calculator.CalculatorService"/>
+    
+    <sca:reference name="stockQuoteService" type="bigbank.stockquote.StockQuoteService"/>
+
+</beans>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/CheckingsAccount/META-INF/spring/CheckingsAccount-context.xml Thu Aug  7 04:44:48 2008
@@ -0,0 +1,33 @@
+<?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">
+
+    <sca:service name="CheckingAccountService"
+        type="bigbank.account.checking.CheckingAccountService" target="CheckingAccountServiceBean"/>
+
+    <bean id="CheckingAccountServiceBean" class="bigbank.account.checking.CheckingAccountServiceImpl">
+    </bean>
+    
+</beans>
\ No newline at end of file

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml Thu Aug  7 04:44:48 2008
@@ -0,0 +1,33 @@
+<?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">
+
+    <sca:service name="SavingsAccountService"
+        type="bigbank.account.savings.SavingsAccountService" target="SavingsAccountServiceBean"/>
+
+    <bean id="SavingsAccountServiceBean" class="bigbank.account.savings.SavingsAccountServiceImpl">
+    </bean>
+
+</beans>

Added: tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml?rev=683591&view=auto
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml (added)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml Thu Aug  7 04:44:48 2008
@@ -0,0 +1,33 @@
+<?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">
+
+    <sca:service name="StockAccountService"
+        type="bigbank.account.stock.StockAccountService" target="StockAccountServiceBean"/>
+
+    <bean id="StockAccountServiceBean" class="bigbank.account.stock.StockAccountServiceImpl">
+    </bean>
+
+</beans>
\ No newline at end of file

Modified: tuscany/java/sca/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java?rev=683591&r1=683590&r2=683591&view=diff
==============================================================================
--- tuscany/java/sca/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java (original)
+++ tuscany/java/sca/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java Thu Aug  7 04:44:48 2008
@@ -45,6 +45,11 @@
     }
 
     public void test() throws Exception {
-        System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
+//        try {
+//          System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") );
+//        }
+//        catch (Exception e) {
+//           
+//        }
     }
 }