summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-08-20 23:41:20 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-08-20 23:41:20 +0000
commit38cfa76da36220f74edab061ed28219d30b55204 (patch)
tree937e4add1459655d3fdfc9f2fea6b0b5699ef639 /sca-java-2.x/trunk
parent46a3d0538ea0f2f678381b9c0974b25cae3545cb (diff)
Update the context accessor spi and dependencies
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@987669 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/META-INF/MANIFEST.MF16
-rw-r--r--sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SpringApplicationContextAccessor.java (renamed from sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringApplicationContextAccessor.java)8
-rw-r--r--sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java3
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-webapp/META-INF/MANIFEST.MF2
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-webapp/pom.xml2
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/java/org/apache/tuscany/sca/implementation/spring/webapp/SpringWebApplicationContextAccessor.java8
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.context.SpringApplicationContextAccessor (renamed from sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.provider.SpringApplicationContextAccessor)0
7 files changed, 21 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/META-INF/MANIFEST.MF
index 49b5ab4e6f..b598607625 100644
--- a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/META-INF/MANIFEST.MF
@@ -51,13 +51,13 @@ Import-Package: org.oasisopen.sca;version="2.0.0",
org.springframework.core;version="3.0.2.RELEASE",
org.springframework.core.io;version="3.0.2.RELEASE",
org.springframework.util;version="3.0.2.RELEASE"
-Export-Package: org.apache.tuscany.sca.implementation.spring.provider;version="2.0.0";
- uses:="org.apache.tuscany.sca.invocation,
- org.apache.tuscany.sca.runtime,
- org.apache.tuscany.sca.context,
- org.apache.tuscany.sca.provider,
+Export-Package: org.apache.tuscany.sca.implementation.spring.context;version="2.0.0";
+ uses:="org.springframework.beans.factory.support,
+ org.springframework.context.support,
+ org.springframework.core.io,
org.apache.tuscany.sca.implementation.spring,
- org.apache.tuscany.sca.core,
- org.apache.tuscany.sca.core.invocation,
- org.apache.tuscany.sca.interfacedef"
+ org.springframework.context,
+ org.apache.tuscany.sca.implementation.spring.provider,
+ org.springframework.beans.factory.config,
+ org.springframework.beans.factory"
diff --git a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringApplicationContextAccessor.java b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SpringApplicationContextAccessor.java
index a9b6dd151a..2d18b5aa6c 100644
--- a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringApplicationContextAccessor.java
+++ b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/context/SpringApplicationContextAccessor.java
@@ -17,7 +17,9 @@
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring.provider;
+package org.apache.tuscany.sca.implementation.spring.context;
+
+import org.springframework.context.ApplicationContext;
/**
* A utility to receive the parent Spring application context
@@ -28,12 +30,12 @@ public interface SpringApplicationContextAccessor {
* application context for implementation.spring components
* @return The parent application context
*/
- Object getParentApplicationContext();
+ ApplicationContext getParentApplicationContext();
/**
* Set the root Spring application context. This is particually useful for Spring web integration where Spring
* creates WebApplicationContext and keeps it in the ServletContext
* @param parentApplicationContext The parent application context
*/
- void setParentApplicationContext(Object parentApplicationContext);
+ void setParentApplicationContext(ApplicationContext parentApplicationContext);
}
diff --git a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java
index 8ad07280a7..be16fb3251 100644
--- a/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java
+++ b/sca-java-2.x/trunk/contrib/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java
@@ -24,6 +24,7 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory;
import org.apache.tuscany.sca.core.invocation.ProxyFactory;
import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
+import org.apache.tuscany.sca.implementation.spring.context.SpringApplicationContextAccessor;
import org.apache.tuscany.sca.provider.ImplementationProvider;
import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -61,7 +62,7 @@ public class SpringImplementationProviderFactory implements ImplementationProvid
public ImplementationProvider createImplementationProvider(RuntimeComponent component,
SpringImplementation implementation) {
ApplicationContext parentApplicationContext =
- (contextAccessor != null) ? (ApplicationContext)contextAccessor.getParentApplicationContext() : null;
+ (contextAccessor != null) ? contextAccessor.getParentApplicationContext() : null;
SpringImplementationWrapper tie =
new SpringImplementationWrapper(implementation, parentApplicationContext, component, propertyFactory);
return new SpringImplementationProvider(component, tie, parentApplicationContext, proxyFactory, propertyFactory);
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-webapp/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/implementation-spring-webapp/META-INF/MANIFEST.MF
index 25cede8426..42c577b6eb 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-webapp/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/modules/implementation-spring-webapp/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@ Import-Package: javax.servlet,
org.apache.tuscany.sca.core;version="2.0.0",
org.apache.tuscany.sca.extensibility;version="2.0.0",
org.apache.tuscany.sca.implementation.spring;version="2.0.0",
- org.apache.tuscany.sca.implementation.spring.invocation;version="2.0.0",
+ org.apache.tuscany.sca.implementation.spring.context;version="2.0.0",
org.apache.tuscany.sca.provider;version="2.0.0",
org.apache.tuscany.sca.runtime;version="2.0.0",
org.springframework.beans;version="3.0.2.RELEASE",
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-webapp/pom.xml b/sca-java-2.x/trunk/modules/implementation-spring-webapp/pom.xml
index cfdce13108..081af3c80d 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-webapp/pom.xml
+++ b/sca-java-2.x/trunk/modules/implementation-spring-webapp/pom.xml
@@ -32,7 +32,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-spring</artifactId>
+ <artifactId>tuscany-implementation-spring-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/java/org/apache/tuscany/sca/implementation/spring/webapp/SpringWebApplicationContextAccessor.java b/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/java/org/apache/tuscany/sca/implementation/spring/webapp/SpringWebApplicationContextAccessor.java
index 623a298b74..f95ba27242 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/java/org/apache/tuscany/sca/implementation/spring/webapp/SpringWebApplicationContextAccessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/java/org/apache/tuscany/sca/implementation/spring/webapp/SpringWebApplicationContextAccessor.java
@@ -26,7 +26,7 @@ import javax.servlet.ServletContext;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.LifeCycleListener;
import org.apache.tuscany.sca.host.http.ExtensibleServletHost;
-import org.apache.tuscany.sca.implementation.spring.invocation.SpringApplicationContextAccessor;
+import org.apache.tuscany.sca.implementation.spring.context.SpringApplicationContextAccessor;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -62,12 +62,12 @@ public class SpringWebApplicationContextAccessor implements SpringApplicationCon
parentApplicationContext = null;
}
- public Object getParentApplicationContext() {
+ public ApplicationContext getParentApplicationContext() {
return parentApplicationContext;
}
- public void setParentApplicationContext(Object parentApplicationContext) {
- this.parentApplicationContext = (ApplicationContext) parentApplicationContext;
+ public void setParentApplicationContext(ApplicationContext parentApplicationContext) {
+ this.parentApplicationContext = parentApplicationContext;
}
}
diff --git a/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.provider.SpringApplicationContextAccessor b/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.context.SpringApplicationContextAccessor
index 506b02c782..506b02c782 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.provider.SpringApplicationContextAccessor
+++ b/sca-java-2.x/trunk/modules/implementation-spring-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.spring.context.SpringApplicationContextAccessor