summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main
diff options
context:
space:
mode:
authorramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-06-23 09:11:37 +0000
committerramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-06-23 09:11:37 +0000
commite74260dedbe4ba4af9d6af3d2856410fd706dc88 (patch)
tree933c3b13f11c534daaab5ef4f039957618b9cf57 /branches/sca-java-1.x/modules/implementation-spring-runtime/src/main
parentedd87337caed8414eadd9ff03339e9d3e534be3e (diff)
Fixes for TUSCANY-3096
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@787589 13f79535-47bb-0310-9956-ffa450edef68
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.java15
1 files changed, 10 insertions, 5 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 d44e4ef408..bf7d133d01 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
@@ -55,12 +55,14 @@ public class SpringContextTie {
private AbstractApplicationContext springContext;
private SpringImplementationStub implementation;
+ private boolean isAnnotationSupported;
- public SpringContextTie(SpringImplementationStub implementation, URL resource) throws Exception {
+ public SpringContextTie(SpringImplementationStub implementation, URL resource, boolean annotationSupport) 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");
- }
+ }
SCAParentApplicationContext scaParentContext = new SCAParentApplicationContext(implementation);
springContext = createApplicationContext(scaParentContext, resource);
}
@@ -120,19 +122,22 @@ public class SpringContextTie {
if (beanClassName.indexOf(".ClassPathXmlApplicationContext") != -1) {
appContext = new ClassPathXmlApplicationContext(listValues, false, scaParentContext);
appContext.refresh();
- includeAnnotationProcessors(appContext.getBeanFactory());
+ if (isAnnotationSupported)
+ includeAnnotationProcessors(appContext.getBeanFactory());
return appContext;
} else {
appContext = new FileSystemXmlApplicationContext(listValues, false, scaParentContext);
appContext.refresh();
- includeAnnotationProcessors(appContext.getBeanFactory());
+ if (isAnnotationSupported)
+ includeAnnotationProcessors(appContext.getBeanFactory());
return appContext;
}
}
}
// use the generic application context as default
- includeAnnotationProcessors(beanFactory);
+ if (isAnnotationSupported)
+ includeAnnotationProcessors(beanFactory);
appContext = new GenericApplicationContext(beanFactory, scaParentContext);
return appContext;
}