diff options
author | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-13 07:19:44 +0000 |
---|---|---|
committer | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-13 07:19:44 +0000 |
commit | ac29baf8fd9151d91b9c75f9cf680c82c848c519 (patch) | |
tree | 082be3b6432a92986c4bd8d7a1511b30d68df6f6 | |
parent | f472733832389221175ea1947b52d9e4145b7af4 (diff) |
Fix for TUSCANY-3017
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@774244 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java b/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java index a07357628b..15d780b185 100644 --- a/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java +++ b/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java @@ -43,6 +43,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.UrlResource;
+import org.springframework.core.SpringVersion;
/**
* This is the runtime side tie for the corresponding tuscany side stub class.
@@ -55,8 +56,11 @@ public class SpringContextTie { private AbstractApplicationContext springContext;
private SpringImplementationStub implementation;
- public SpringContextTie(SpringImplementationStub implementation, URL resource) {
+ public SpringContextTie(SpringImplementationStub implementation, URL resource) throws Exception {
this.implementation = implementation;
+ if (! SpringVersion.getVersion().equals("2.5.5")) {
+ throw new RuntimeException("Unsupported version: Use only Spring Framework Version 2.5.5");
+ }
SCAParentApplicationContext scaParentContext = new SCAParentApplicationContext(implementation);
springContext = createApplicationContext(scaParentContext, resource);
}
|