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/04/05 17:25:47 UTC

svn commit: r525845 - in /incubator/tuscany/java/sca/modules: ./ core-spring/ core-spring/src/main/java/org/apache/tuscany/bean/context/ core-spring/src/main/java/org/apache/tuscany/bean/impl/ core-spring/src/main/java/org/apache/tuscany/java/bean/impl...

Author: jsdelfino
Date: Thu Apr  5 08:25:45 2007
New Revision: 525845

URL: http://svn.apache.org/viewvc?view=rev&rev=525845
Log:
Strawman implementation of a core runtime based on Spring. Will be useful to test our model layer and the usability of our SPIs independently of our core and IoC container, and illustrate how the IoC container can be swapped to use another one.

Added:
    incubator/tuscany/java/sca/modules/core-spring/   (props changed)
      - copied from r525724, incubator/tuscany/sandbox/sebastien/java/sca/modules/bean/
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite   (with props)
Modified:
    incubator/tuscany/java/sca/modules/core-spring/pom.xml
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/context/CompositeApplicationContext.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanAssemblyFactory.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanComponentImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanReferenceImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaFactory.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaInterfaceImpl.java
    incubator/tuscany/java/sca/modules/pom.xml

Propchange: incubator/tuscany/java/sca/modules/core-spring/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Apr  5 08:25:45 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Modified: incubator/tuscany/java/sca/modules/core-spring/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/pom.xml?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/core-spring/pom.xml Thu Apr  5 08:25:45 2007
@@ -18,63 +18,78 @@
  * under the License.    
 -->
 <project>
+    <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.tuscany.sca.modules</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.1-sandbox-incubating-SNAPSHOT</version>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-modules</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tuscany-assembly-bean</artifactId>
-    <name>Apache Tuscany Assembly Model Variant</name>
-    <description>A prototype of the SCA Assembly Model backed by Spring bean definitions</description>
+    <artifactId>tuscany-core-spring</artifactId>
+    <name>Apache Tuscany SCA Spring-based Core Runtime</name>
 
     <dependencies>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.modules</groupId>
+            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-assembly</artifactId>
-            <version>0.1-sandbox-incubating-SNAPSHOT</version>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-idl-java</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.modules</groupId>
-            <artifactId>tuscany-java</artifactId>
-            <version>0.1-sandbox-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-impl-java</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
             <version>2.0.3</version>
-            <scope>compile</scope>
         </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
             <version>2.0.3</version>
-            <scope>compile</scope>
         </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
             <version>2.0.3</version>
-            <scope>compile</scope>
         </dependency>
 
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.2</version>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api-r1.0</artifactId>
+            <version>1.0.1-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-assembly-xml</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
-		
+
         <dependency>
-            <groupId>org.osoa</groupId>
-            <artifactId>sca-api-r1.0</artifactId>
-            <version>0.1-sandbox-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-idl-java-xml</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-impl-java-xml</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/context/CompositeApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/context/CompositeApplicationContext.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/context/CompositeApplicationContext.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/context/CompositeApplicationContext.java Thu Apr  5 08:25:45 2007
@@ -20,19 +20,19 @@
 
 import java.io.IOException;
 
-import org.apache.tuscany.assembly.model.Component;
-import org.apache.tuscany.assembly.model.ComponentReference;
-import org.apache.tuscany.assembly.model.ComponentService;
-import org.apache.tuscany.assembly.model.Composite;
-import org.apache.tuscany.assembly.model.CompositeReference;
-import org.apache.tuscany.assembly.model.CompositeService;
-import org.apache.tuscany.assembly.model.Contract;
-import org.apache.tuscany.assembly.model.Property;
-import org.apache.tuscany.assembly.model.Reference;
-import org.apache.tuscany.assembly.model.SCABinding;
-import org.apache.tuscany.assembly.model.Service;
-import org.apache.tuscany.java.model.JavaImplementation;
-import org.apache.tuscany.java.model.JavaInterface;
+import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.ComponentReference;
+import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.CompositeReference;
+import org.apache.tuscany.assembly.CompositeService;
+import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.Property;
+import org.apache.tuscany.assembly.Reference;
+import org.apache.tuscany.assembly.SCABinding;
+import org.apache.tuscany.assembly.Service;
+import org.apache.tuscany.idl.java.JavaInterface;
+import org.apache.tuscany.implementation.java.JavaImplementation;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.MutablePropertyValues;
 import org.springframework.beans.factory.config.RuntimeBeanReference;

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanAssemblyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanAssemblyFactory.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanAssemblyFactory.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanAssemblyFactory.java Thu Apr  5 08:25:45 2007
@@ -18,25 +18,27 @@
  */
 package org.apache.tuscany.bean.impl;
 
-import org.apache.tuscany.assembly.model.AbstractProperty;
-import org.apache.tuscany.assembly.model.AbstractReference;
-import org.apache.tuscany.assembly.model.AbstractService;
-import org.apache.tuscany.assembly.model.AssemblyFactory;
-import org.apache.tuscany.assembly.model.Callback;
-import org.apache.tuscany.assembly.model.Component;
-import org.apache.tuscany.assembly.model.ComponentProperty;
-import org.apache.tuscany.assembly.model.ComponentReference;
-import org.apache.tuscany.assembly.model.ComponentService;
-import org.apache.tuscany.assembly.model.ComponentType;
-import org.apache.tuscany.assembly.model.Composite;
-import org.apache.tuscany.assembly.model.CompositeReference;
-import org.apache.tuscany.assembly.model.CompositeService;
-import org.apache.tuscany.assembly.model.ConstrainingType;
-import org.apache.tuscany.assembly.model.Property;
-import org.apache.tuscany.assembly.model.Reference;
-import org.apache.tuscany.assembly.model.SCABinding;
-import org.apache.tuscany.assembly.model.Service;
-import org.apache.tuscany.assembly.model.Wire;
+import org.apache.tuscany.assembly.AbstractProperty;
+import org.apache.tuscany.assembly.AbstractReference;
+import org.apache.tuscany.assembly.AbstractService;
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.Callback;
+import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.ComponentProperty;
+import org.apache.tuscany.assembly.ComponentReference;
+import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.assembly.ComponentType;
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.CompositeReference;
+import org.apache.tuscany.assembly.CompositeService;
+import org.apache.tuscany.assembly.ConstrainingType;
+import org.apache.tuscany.assembly.Property;
+import org.apache.tuscany.assembly.Reference;
+import org.apache.tuscany.assembly.SCABinding;
+import org.apache.tuscany.assembly.Service;
+import org.apache.tuscany.assembly.Wire;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.idl.Operation;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 
 /**
@@ -55,6 +57,10 @@
 		this.beanRegistry = beanRegistry;
 	}
 
+        public BeanAssemblyFactory(BeanDefinitionRegistry beanRegistry) {
+            this(new DefaultAssemblyFactory(), beanRegistry);
+        }
+
 	public AbstractProperty createAbstractProperty() {
 		return defaultFactory.createAbstractProperty();
 	}
@@ -125,5 +131,9 @@
 
 	public SCABinding createSCABinding() {
 		return defaultFactory.createSCABinding();
+	}
+	
+	public Operation createOperation() {
+		return defaultFactory.createOperation();
 	}
 }

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanComponentImpl.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanComponentImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanComponentImpl.java Thu Apr  5 08:25:45 2007
@@ -21,14 +21,14 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tuscany.assembly.model.Component;
-import org.apache.tuscany.assembly.model.ComponentProperty;
-import org.apache.tuscany.assembly.model.ComponentReference;
-import org.apache.tuscany.assembly.model.ComponentService;
-import org.apache.tuscany.assembly.model.ConstrainingType;
-import org.apache.tuscany.assembly.model.Implementation;
-import org.apache.tuscany.policy.model.Intent;
-import org.apache.tuscany.policy.model.PolicySet;
+import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.ComponentProperty;
+import org.apache.tuscany.assembly.ComponentReference;
+import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.assembly.ConstrainingType;
+import org.apache.tuscany.assembly.Implementation;
+import org.apache.tuscany.policy.Intent;
+import org.apache.tuscany.policy.PolicySet;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 import org.springframework.beans.factory.support.ChildBeanDefinition;
 
@@ -47,7 +47,7 @@
 	private List<ComponentService> services = new ArrayList<ComponentService>();
 	private List<Intent> requiredIntents = new ArrayList<Intent>();
 	private List<PolicySet> policySets = new ArrayList<PolicySet>();
-	private List<?> extensions = new ArrayList();
+	private List<Object> extensions = new ArrayList<Object>();
 	private boolean unresolved = false;
 	private BeanDefinitionRegistry beanRegistry;
 	
@@ -145,7 +145,7 @@
 		super.setAutowireMode(autowire? AUTOWIRE_BY_TYPE:AUTOWIRE_NO);
 	}
 
-	public List<?> getExtensions() {
+	public List<Object> getExtensions() {
 		return extensions;
 	}
 

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanReferenceImpl.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/bean/impl/BeanReferenceImpl.java Thu Apr  5 08:25:45 2007
@@ -18,9 +18,9 @@
  */
 package org.apache.tuscany.bean.impl;
 
-import org.apache.tuscany.assembly.model.ComponentService;
-import org.apache.tuscany.assembly.model.Reference;
-import org.apache.tuscany.assembly.model.SCABinding;
+import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.assembly.Reference;
+import org.apache.tuscany.assembly.SCABinding;
 import org.springframework.beans.factory.config.RuntimeBeanReference;
 
 /**

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaFactory.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaFactory.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaFactory.java Thu Apr  5 08:25:45 2007
@@ -18,9 +18,9 @@
  */
 package org.apache.tuscany.java.bean.impl;
 
-import org.apache.tuscany.java.model.JavaFactory;
-import org.apache.tuscany.java.model.JavaImplementation;
-import org.apache.tuscany.java.model.JavaInterface;
+import org.apache.tuscany.idl.java.JavaFactory;
+import org.apache.tuscany.idl.java.JavaInterface;
+import org.apache.tuscany.implementation.java.JavaImplementation;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 
 /**

Added: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java Thu Apr  5 08:25:45 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 org.apache.tuscany.java.bean.impl;
+
+import org.apache.tuscany.implementation.java.JavaImplementation;
+import org.apache.tuscany.implementation.java.JavaImplementationFactory;
+import org.springframework.beans.factory.support.BeanDefinitionRegistry;
+
+/**
+ * An alternate implementation of the SCA Java assembly model factory that creates SCA
+ * Java assembly model objects backed by Spring bean definitions.
+ *
+ *  @version $Rev$ $Date$
+ */
+public class BeanJavaImplementationFactory implements JavaImplementationFactory {
+	
+	private BeanDefinitionRegistry beanRegistry;
+	
+	public BeanJavaImplementationFactory(BeanDefinitionRegistry beanRegistry) {
+		this.beanRegistry = beanRegistry;
+	}
+
+	public JavaImplementation createJavaImplementation() {
+		return new BeanJavaImplementationImpl(beanRegistry);
+	}
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationImpl.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaImplementationImpl.java Thu Apr  5 08:25:45 2007
@@ -21,13 +21,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tuscany.assembly.model.ConstrainingType;
-import org.apache.tuscany.assembly.model.Property;
-import org.apache.tuscany.assembly.model.Reference;
-import org.apache.tuscany.assembly.model.Service;
-import org.apache.tuscany.java.model.JavaImplementation;
-import org.apache.tuscany.policy.model.Intent;
-import org.apache.tuscany.policy.model.PolicySet;
+import org.apache.tuscany.assembly.ConstrainingType;
+import org.apache.tuscany.assembly.Property;
+import org.apache.tuscany.assembly.Reference;
+import org.apache.tuscany.assembly.Service;
+import org.apache.tuscany.implementation.java.JavaImplementation;
+import org.apache.tuscany.policy.Intent;
+import org.apache.tuscany.policy.PolicySet;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 import org.springframework.beans.factory.support.RootBeanDefinition;
 
@@ -44,7 +44,7 @@
 	private List<Intent> requiredIntents = new ArrayList<Intent>();
 	private List<PolicySet> policySets = new ArrayList<PolicySet>();
 	private ConstrainingType constrainingType;
-	private List<?> extensions = new ArrayList();
+	private List<Object> extensions = new ArrayList<Object>();
 	private boolean unresolved;
 	private BeanDefinitionRegistry beanRegistry;
 	
@@ -131,7 +131,7 @@
 		this.constrainingType = constrainingType;
 	}
 
-	public List<?> getExtensions() {
+	public List<Object> getExtensions() {
 		return extensions;
 	}
 

Modified: incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaInterfaceImpl.java?view=diff&rev=525845&r1=525724&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaInterfaceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/java/bean/impl/BeanJavaInterfaceImpl.java Thu Apr  5 08:25:45 2007
@@ -21,8 +21,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tuscany.java.model.JavaInterface;
-import org.apache.tuscany.policy.model.Intent;
+import org.apache.tuscany.idl.Operation;
+import org.apache.tuscany.idl.java.JavaInterface;
+import org.apache.tuscany.policy.Intent;
 
 /**
  * An alternate implementation of the SCA Java assembly model JavaInterface
@@ -37,7 +38,8 @@
 	private boolean conversational;
 	private boolean remotable;
 	List<Intent> requiredIntents = new ArrayList<Intent>();
-	private List<?> extensions = new ArrayList();
+	private List<Object> extensions = new ArrayList<Object>();
+        private List<Operation> operations = new ArrayList<Operation>();
 	private boolean unresolved = false;
 
 	public String getName() {
@@ -81,9 +83,13 @@
 		return requiredIntents;
 	}
 
-	public List<?> getExtensions() {
+	public List<Object> getExtensions() {
 		return extensions;
 	}
+        
+        public List<Operation> getOperations() {
+            return operations;
+        }
 
 	public boolean isUnresolved() {
 		return unresolved;

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+public interface AddService {
+
+    double add(double n1, double n2);
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java Thu Apr  5 08:25:45 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 calculator;
+
+import org.osoa.sca.annotations.EagerInit;
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Add service
+ */
+@Scope("COMPOSITE")
+@EagerInit
+public class AddServiceImpl implements AddService {
+
+    public double add(double n1, double n2) {
+        return n1 + n2;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/AddServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java Thu Apr  5 08:25:45 2007
@@ -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 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);
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Calculator service.
+ */
+@Scope("COMPOSITE")
+public class CalculatorServiceImpl implements CalculatorService {
+
+    private AddService addService;
+    private SubtractService subtractService;
+    private MultiplyService multiplyService;
+    private DivideService divideService;
+
+    @Reference
+    public void setAddService(AddService addService) {
+        this.addService = addService;
+    }
+
+    @Reference
+    public void setSubtractService(SubtractService subtractService) {
+        this.subtractService = subtractService;
+    }
+
+    @Reference
+    public void setDivideService(DivideService divideService) {
+        this.divideService = divideService;
+    }
+
+    @Reference
+    public void setMultiplyService(MultiplyService multiplyService) {
+        this.multiplyService = multiplyService;
+    }
+
+    public double add(double n1, double n2) {
+        return addService.add(n1, n2);
+    }
+
+    public double subtract(double n1, double n2) {
+        return subtractService.subtract(n1, n2);
+    }
+
+    public double multiply(double n1, double n2) {
+        return multiplyService.multiply(n1, n2);
+    }
+
+    public double divide(double n1, double n2) {
+        return divideService.divide(n1, n2);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/CalculatorServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+public interface DivideService {
+
+    double divide(double n1, double n2);
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Divide service.
+ */
+@Scope("COMPOSITE")
+public class DivideServiceImpl implements DivideService {
+
+    public double divide(double n1, double n2) {
+        return n1 / n2;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/DivideServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+public interface MultiplyService {
+
+    double multiply(double n1, double n2);
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Multiply service.
+ */
+@Scope("COMPOSITE")
+public class MultiplyServiceImpl implements MultiplyService {
+
+    public double multiply(double n1, double n2) {
+        return n1 * n2;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/MultiplyServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+public interface SubtractService {
+
+    double subtract(double n1, double n2);
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the subtract service.
+ */
+@Scope("COMPOSITE")
+public class SubtractServiceImpl implements SubtractService {
+
+    public double subtract(double n1, double n2) {
+        return n1 - n2;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/calculator/SubtractServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.application.context;
+
+import calculator.CalculatorService;
+
+/**
+ * This client program shows how to create an SCA runtime, start it, locate the
+ * Calculator service and invoke it.
+ */
+public class CalculatorClient {
+    public static void main(String[] args) throws Exception {
+
+        TestRuntimeContext context = new TestRuntimeContext("TestBeanCalculator.composite");
+
+        CalculatorService calculatorService = context.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+        // Calculate
+        System.out.println("3 + 2=" + calculatorService.add(3, 2));
+        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+        System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.application.context;
+
+import junit.framework.TestCase;
+import calculator.CalculatorService;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class CalculatorTestCase extends TestCase {
+
+    private TestRuntimeContext context;
+    private CalculatorService calculatorService;
+
+    protected void setUp() throws Exception {
+        context = new TestRuntimeContext("TestBeanCalculator.composite");
+
+        calculatorService = context.getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    protected void tearDown() throws Exception {
+        context = null;
+        calculatorService = null;
+    }
+
+    public void testCalculator() throws Exception {
+        // Calculate
+        assertEquals(calculatorService.add(3, 2), 5.0);
+        assertEquals(calculatorService.subtract(3, 2), 1.0);
+        assertEquals(calculatorService.multiply(3, 2), 6.0);
+        assertEquals(calculatorService.divide(3, 2), 1.5);
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/CalculatorTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.application.context;
+
+import java.net.URL;
+
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.xml.impl.ComponentTypeProcessor;
+import org.apache.tuscany.assembly.xml.impl.CompositeProcessor;
+import org.apache.tuscany.assembly.xml.impl.ConstrainingTypeProcessor;
+import org.apache.tuscany.bean.context.CompositeApplicationContext;
+import org.apache.tuscany.idl.java.xml.JavaInterfaceProcessor;
+import org.apache.tuscany.implementation.java.xml.JavaImplementationProcessor;
+import org.apache.tuscany.services.spi.contribution.ContributionException;
+import org.apache.tuscany.services.spi.contribution.DefaultArtifactResolver;
+import org.apache.tuscany.services.spi.contribution.DefaultStAXArtifactProcessorRegistry;
+
+/**
+ * A mini test runtime that uses a custom Spring ApplicationContext to turn an
+ * SCA composite into an assembly of Spring bean definitions.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class TestRuntimeContext {
+
+    private CompositeApplicationContext applicationContext;
+
+    public TestRuntimeContext(String compositeFile) {
+        
+        // Populate ArtifactProcessor registry
+        DefaultStAXArtifactProcessorRegistry registry = new DefaultStAXArtifactProcessorRegistry();
+        CompositeProcessor compositeProcessor = new CompositeProcessor(registry);
+        registry.addArtifactProcessor(compositeProcessor);
+        registry.addArtifactProcessor(new ComponentTypeProcessor(registry));
+        registry.addArtifactProcessor(new ConstrainingTypeProcessor(registry));
+        registry.addArtifactProcessor(new JavaInterfaceProcessor());
+        registry.addArtifactProcessor(new JavaImplementationProcessor());
+        
+        // Create a resolver
+        DefaultArtifactResolver resolver = new DefaultArtifactResolver();
+
+        try {
+            // Parse the composite file
+            URL url = getClass().getClassLoader().getResource(compositeFile);
+            Composite composite = registry.read(url, Composite.class);
+            resolver.put(composite, composite);
+            
+            // Resolve and configure the composite
+            compositeProcessor.resolve(composite, resolver);
+            compositeProcessor.optimize(composite);
+    
+            // Create a Spring application composite context for the composite
+            applicationContext = new CompositeApplicationContext(composite);
+            applicationContext.refresh();
+            
+        } catch (ContributionException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns the service with the specified name.
+     * 
+     * @param <B>
+     * @param businessInterface
+     * @param serviceName
+     * @return
+     */
+    public <B> B getService(Class<B> businessInterface, String serviceName) {
+        Object bean = applicationContext.getBean(serviceName);
+        return businessInterface.cast(bean);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.application.context;
+
+/**
+ * TestRuntimeException
+ * 
+ * @version $Rev$ $Date$
+ */
+public class TestRuntimeException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    public TestRuntimeException(Exception e) {
+        super(e);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.model.variant;
+
+import calculator.CalculatorService;
+
+/**
+ * This client program shows how to create an SCA runtime, start it, locate the
+ * Calculator service and invoke it.
+ */
+public class CalculatorClient {
+    public static void main(String[] args) throws Exception {
+
+        VariantRuntimeContext context = new VariantRuntimeContext("TestBeanCalculator.composite");
+
+        CalculatorService calculatorService = context.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+        // Calculate
+        System.out.println("3 + 2=" + calculatorService.add(3, 2));
+        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+        System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.model.variant;
+
+import junit.framework.TestCase;
+import calculator.CalculatorService;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class CalculatorTestCase extends TestCase {
+
+    private VariantRuntimeContext context;
+    private CalculatorService calculatorService;
+
+    protected void setUp() throws Exception {
+        context = new VariantRuntimeContext("TestBeanCalculator.composite");
+
+        calculatorService = context.getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    protected void tearDown() throws Exception {
+        context = null;
+        calculatorService = null;
+    }
+
+    public void testCalculator() throws Exception {
+        // Calculate
+        assertEquals(calculatorService.add(3, 2), 5.0);
+        assertEquals(calculatorService.subtract(3, 2), 1.0);
+        assertEquals(calculatorService.multiply(3, 2), 6.0);
+        assertEquals(calculatorService.divide(3, 2), 1.5);
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/CalculatorTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.model.variant;
+
+import java.net.URL;
+
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.assembly.xml.impl.ComponentTypeProcessor;
+import org.apache.tuscany.assembly.xml.impl.CompositeProcessor;
+import org.apache.tuscany.assembly.xml.impl.ConstrainingTypeProcessor;
+import org.apache.tuscany.bean.impl.BeanAssemblyFactory;
+import org.apache.tuscany.idl.java.xml.JavaInterfaceProcessor;
+import org.apache.tuscany.implementation.java.JavaImplementationFactory;
+import org.apache.tuscany.implementation.java.xml.JavaImplementationProcessor;
+import org.apache.tuscany.java.bean.impl.BeanJavaImplementationFactory;
+import org.apache.tuscany.policy.PolicyFactory;
+import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
+import org.apache.tuscany.services.spi.contribution.ContributionException;
+import org.apache.tuscany.services.spi.contribution.DefaultArtifactResolver;
+import org.apache.tuscany.services.spi.contribution.DefaultStAXArtifactProcessorRegistry;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+
+/**
+ * A mini test runtime that uses the SCA assembly model variant implementation
+ * backed by Spring bean definitions.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class VariantRuntimeContext {
+
+    private DefaultListableBeanFactory beanFactory;
+
+    public VariantRuntimeContext(String compositeFile) {
+
+        // Create Spring bean factory
+        beanFactory = new DefaultListableBeanFactory();
+
+        // Create SCA assembly and SCA Java factories
+        AssemblyFactory assemblyFactory = new BeanAssemblyFactory(new DefaultAssemblyFactory(), beanFactory);
+        PolicyFactory policyFactory = new DefaultPolicyFactory();
+        JavaImplementationFactory javaImplementationFactory = new BeanJavaImplementationFactory(beanFactory);
+
+        // Populate ArtifactProcessor registry
+        DefaultStAXArtifactProcessorRegistry registry = new DefaultStAXArtifactProcessorRegistry();
+        CompositeProcessor compositeProcessor = new CompositeProcessor(assemblyFactory, policyFactory, registry);
+        registry.addArtifactProcessor(compositeProcessor);
+        registry.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory, policyFactory, registry));
+        registry.addArtifactProcessor(new ConstrainingTypeProcessor(registry));
+        registry.addArtifactProcessor(new JavaInterfaceProcessor());
+        registry.addArtifactProcessor(new JavaImplementationProcessor(javaImplementationFactory));
+        
+        // Create a resolver
+        DefaultArtifactResolver resolver = new DefaultArtifactResolver();
+
+        try {
+            // Parse the composite file
+            URL url = getClass().getClassLoader().getResource(compositeFile);
+            Composite composite = registry.read(url, Composite.class);
+            resolver.put(composite, composite);
+            
+            // Resolve and configure the composite
+            compositeProcessor.resolve(composite, resolver);
+            compositeProcessor.optimize(composite);
+            
+        } catch (ContributionException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public <B> B getService(Class<B> businessInterface, String serviceName) {
+        Object bean = beanFactory.getBean(serviceName);
+        return businessInterface.cast(bean);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java Thu Apr  5 08:25:45 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package test.model.variant;
+
+/**
+ * VariantRuntimeException
+ * 
+ * @version $Rev$ $Date$
+ */
+public class VariantRuntimeException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    public VariantRuntimeException(Exception e) {
+        super(e);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite?view=auto&rev=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite (added)
+++ incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite Thu Apr  5 08:25:45 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	xmlns:calc="http://sample.calculator"
+	name="calc:TestBeanCalculator">
+
+    <service name="CalculatorService" promote="CalculatorServiceComponent">
+        <interface.java interface="calculator.CalculatorService"/>
+    </service>
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent"/>
+        <reference name="subtractService" target="SubtractServiceComponent"/>
+        <reference name="multiplyService" target="MultiplyServiceComponent"/>
+        <reference name="divideService" target="DivideServiceComponent"/>
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spring/src/test/resources/TestBeanCalculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/pom.xml?view=diff&rev=525845&r1=525844&r2=525845
==============================================================================
--- incubator/tuscany/java/sca/modules/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/pom.xml Thu Apr  5 08:25:45 2007
@@ -50,6 +50,7 @@
                 <module>core</module>
                 -->
                 <module>core-spi</module>
+                <module>core-spring</module>
                 <module>databinding</module>
                 <module>databinding-axiom</module>
                 <!--



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