summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-10-13 02:31:48 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-10-13 02:31:48 +0000
commitee05f527b608fcb08ca1dd630e9b274b6f67d500 (patch)
tree443b7496cbd4f2ee1d837f2d6c6b8aa00bf8f2e2 /java/sca/modules
parent8a2a5bb4dfbb51f3f9fbee65f47842b9c6fbdcd0 (diff)
TUSCANY-2613 - Upgrading Spring version to 2.5.5. Thanks for the patch Ram.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703904 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-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
4 files changed, 47 insertions, 37 deletions
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>