summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-11-16 06:50:58 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-11-16 06:50:58 +0000
commita58905ee30aa63707ddc0e2e7d0b5747936a6594 (patch)
tree44ac3dd966a65aeb9cd7211939504d320b218848 /sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache
parent6974aa72eb761414a45f93f2311f337e5b686456 (diff)
Fix the spring delegation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1410212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java8
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java6
2 files changed, 8 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java b/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
index 44a3ee2b88..35524bb6ec 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
+++ b/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.implementation.spring.SpringSCAReferenceElement;
import org.apache.tuscany.sca.implementation.spring.SpringSCAServiceElement;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValue;
+import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanReference;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -61,6 +62,13 @@ public class SCAGenericApplicationContext extends GenericApplicationContext {
this.classloader = classloader;
}
+ /**
+ * Force the parent bean factory to be the SCA parent context itself
+ */
+ protected BeanFactory getInternalParentBeanFactory() {
+ return getParent();
+ }
+
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.setBeanClassLoader(classloader);
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java b/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
index 2829891c52..654d0c6954 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
+++ b/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
@@ -60,12 +60,6 @@ public class SCAParentApplicationContext extends GenericApplicationContext imple
this.implementation = implementation;
} // end constructor
-
- protected BeanFactory getInternalParentBeanFactory() {
- // Disable the parent delegation as we'll handle it inside the getBean()
- return null;
- }
-
public Object getBean(String name) throws BeansException {
return getBean(name, (Class)null);
}