Author: rfeng
Date: Fri Nov 16 06:50:58 2012
New Revision: 1410212
URL: http://svn.apache.org/viewvc?rev=1410212&view=rev
Log:
Fix the spring delegation
Modified:
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
Modified:
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java?rev=1410212&r1=1410211&r2=1410212&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAGenericApplicationContext.java
Fri Nov 16 06:50:58 2012
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.implementa
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 SCAGenericApplicationContex
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);
Modified:
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java?rev=1410212&r1=1410211&r2=1410212&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SCAParentApplicationContext.java
Fri Nov 16 06:50:58 2012
@@ -60,12 +60,6 @@ public class SCAParentApplicationContext
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);
}