summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/itest/spring/pom.xml21
-rw-r--r--java/sca/modules/core-spring/pom.xml6
-rw-r--r--java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java37
-rw-r--r--java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/implementation/java/impl/BeanBaseJavaImplementationImpl.java35
-rw-r--r--java/sca/modules/implementation-spring/pom.xml6
-rw-r--r--java/sca/samples/spring-bigbank-stockquote/pom.xml20
6 files changed, 47 insertions, 78 deletions
diff --git a/java/sca/itest/spring/pom.xml b/java/sca/itest/spring/pom.xml
index 331b9c4c17..294d5804fe 100644
--- a/java/sca/itest/spring/pom.xml
+++ b/java/sca/itest/spring/pom.xml
@@ -55,26 +55,5 @@
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
-
- <!-- Spring dependencies... -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.8</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>2.0.8</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>2.0.8</version>
- </dependency>
-
-
</dependencies>
</project>
diff --git a/java/sca/modules/core-spring/pom.xml b/java/sca/modules/core-spring/pom.xml
index 1ff1398167..b321d194b5 100644
--- a/java/sca/modules/core-spring/pom.xml
+++ b/java/sca/modules/core-spring/pom.xml
@@ -51,19 +51,19 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
<dependency>
diff --git a/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java b/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java
index 2c27a5c6d5..f2c517b092 100644
--- a/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java
+++ b/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java
@@ -31,7 +31,8 @@ import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.PolicySet;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
-import org.springframework.beans.factory.support.ChildBeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.GenericBeanDefinition;
/**
* An implementation of the SCA assembly Component interface backed by a Spring
@@ -39,7 +40,7 @@ import org.springframework.beans.factory.support.ChildBeanDefinition;
*
* @version $Rev$ $Date$
*/
-public class BeanComponentImpl extends ChildBeanDefinition implements Component, Cloneable {
+public class BeanComponentImpl extends GenericBeanDefinition implements Component, Cloneable {
private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
public IntentAttachPointType getType() {
@@ -66,25 +67,29 @@ public class BeanComponentImpl extends ChildBeanDefinition implements Component,
private BeanDefinitionRegistry beanRegistry;
protected BeanComponentImpl(BeanDefinitionRegistry beanRegistry) {
- super((String)"");
+ //super((String)"");
this.beanRegistry = beanRegistry;
}
@Override
- public Object clone() throws CloneNotSupportedException {
- BeanComponentImpl clone = (BeanComponentImpl)super.clone();
-
+ public AbstractBeanDefinition cloneBeanDefinition() {
+ BeanComponentImpl clone = (BeanComponentImpl)super.cloneBeanDefinition();
clone.getProperties().clear();
- for (ComponentProperty property : getProperties()) {
- clone.getProperties().add((ComponentProperty)property.clone());
- }
- clone.getReferences().clear();
- for (ComponentReference reference : getReferences()) {
- clone.getReferences().add((ComponentReference)reference.clone());
- }
- clone.getServices().clear();
- for (ComponentService service : getServices()) {
- clone.getServices().add((ComponentService)service.clone());
+ try {
+ for (ComponentProperty property : getProperties()) {
+ clone.getProperties().add((ComponentProperty)property.clone());
+ }
+ clone.getReferences().clear();
+ for (ComponentReference reference : getReferences()) {
+ clone.getReferences().add((ComponentReference)reference.clone());
+ }
+ clone.getServices().clear();
+ for (ComponentService service : getServices()) {
+ clone.getServices().add((ComponentService)service.clone());
+ }
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ //throw new CloneNotSupportedException(e.getMessage());
}
return clone;
}
diff --git a/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/implementation/java/impl/BeanBaseJavaImplementationImpl.java b/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/implementation/java/impl/BeanBaseJavaImplementationImpl.java
index 9587a2b0ae..49abfb4162 100644
--- a/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/implementation/java/impl/BeanBaseJavaImplementationImpl.java
+++ b/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/implementation/java/impl/BeanBaseJavaImplementationImpl.java
@@ -31,7 +31,8 @@ import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.PolicySet;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
-import org.springframework.beans.factory.support.RootBeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.GenericBeanDefinition;
/**
* An implementation of the SCA assembly JavaImplementation interface backed by a Spring
@@ -39,7 +40,7 @@ import org.springframework.beans.factory.support.RootBeanDefinition;
*
* @version $Rev$ $Date$
*/
-public class BeanBaseJavaImplementationImpl extends RootBeanDefinition implements BaseJavaImplementation, Cloneable {
+public class BeanBaseJavaImplementationImpl extends GenericBeanDefinition implements BaseJavaImplementation, Cloneable {
private static final long serialVersionUID = 1L;
private List<Service> services = new ArrayList<Service>();
@@ -65,20 +66,24 @@ public class BeanBaseJavaImplementationImpl extends RootBeanDefinition implement
}
@Override
- public Object clone() throws CloneNotSupportedException {
- BeanBaseJavaImplementationImpl clone = (BeanBaseJavaImplementationImpl)super.clone();
-
+ public AbstractBeanDefinition cloneBeanDefinition() {
+ BeanBaseJavaImplementationImpl clone = (BeanBaseJavaImplementationImpl)super.cloneBeanDefinition();
clone.getServices().clear();
- for (Service service : getServices()) {
- clone.getServices().add((Service)service.clone());
- }
- clone.getReferences().clear();
- for (Reference reference : getReferences()) {
- clone.getReferences().add((Reference)reference.clone());
- }
- clone.getProperties().clear();
- for (Property property : getProperties()) {
- clone.getProperties().add((Property)property.clone());
+ try {
+ for (Service service : getServices()) {
+ clone.getServices().add((Service)service.clone());
+ }
+ clone.getReferences().clear();
+ for (Reference reference : getReferences()) {
+ clone.getReferences().add((Reference)reference.clone());
+ }
+ clone.getProperties().clear();
+ for (Property property : getProperties()) {
+ clone.getProperties().add((Property)property.clone());
+ }
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ //throw new CloneNotSupportedException(e.getMessage());
}
return clone;
}
diff --git a/java/sca/modules/implementation-spring/pom.xml b/java/sca/modules/implementation-spring/pom.xml
index 4d613ca9fa..94d2099659 100644
--- a/java/sca/modules/implementation-spring/pom.xml
+++ b/java/sca/modules/implementation-spring/pom.xml
@@ -87,19 +87,19 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>2.0.8</version>
+ <version>2.5.5</version>
</dependency>
</dependencies>
diff --git a/java/sca/samples/spring-bigbank-stockquote/pom.xml b/java/sca/samples/spring-bigbank-stockquote/pom.xml
index 70eeb3c018..43cbccb10a 100644
--- a/java/sca/samples/spring-bigbank-stockquote/pom.xml
+++ b/java/sca/samples/spring-bigbank-stockquote/pom.xml
@@ -83,26 +83,6 @@
<version>4.5</version>
<scope>test</scope>
</dependency>
-
- <!-- Spring dependencies... -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.8</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>2.0.8</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>2.0.8</version>
- </dependency>
-
</dependencies>
<build>