diff options
Diffstat (limited to 'branches/sca-java-1.x')
-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);
}
|