summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/modules/implementation-spring-runtime/src/main')
-rw-r--r--branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java9
1 files changed, 6 insertions, 3 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 bf7d133d01..9e56eac6cd 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
@@ -56,12 +56,15 @@ public class SpringContextTie {
private AbstractApplicationContext springContext;
private SpringImplementationStub implementation;
private boolean isAnnotationSupported;
+ private String versionSupported;
- public SpringContextTie(SpringImplementationStub implementation, URL resource, boolean annotationSupport) throws Exception {
+ public SpringContextTie(SpringImplementationStub implementation, URL resource, boolean annotationSupport, String versionSupported) throws Exception {
this.implementation = implementation;
this.isAnnotationSupported = annotationSupport;
- if ((SpringVersion.getVersion()!= null) && (! SpringVersion.getVersion().equals("2.5.5"))) {
- throw new RuntimeException("Unsupported version: Use only Spring Framework Version 2.5.5");
+ this.versionSupported = versionSupported;
+ if (! this.versionSupported.equals("ANY")) {
+ if ((SpringVersion.getVersion()!= null) && (! SpringVersion.getVersion().equals(versionSupported)))
+ throw new RuntimeException("Unsupported version: Use only Spring Framework Version " + versionSupported);
}
SCAParentApplicationContext scaParentContext = new SCAParentApplicationContext(implementation);
springContext = createApplicationContext(scaParentContext, resource);