summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-30 22:10:11 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-30 22:10:11 +0000
commitef25a099e9ea2064b9523ec33a15f114ee52ce45 (patch)
tree8bba02f2ca100c9331fb24d018293ae10cc6395c /java/sca/modules/core/src
parentd058702bea1602cdb0f4a7887419c0db1104a0a9 (diff)
Propagate osgi properties for OSGi remote services
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@831468 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core/src')
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java39
1 files changed, 19 insertions, 20 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
index 1c4ded13fc..ecc1a4e599 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
@@ -497,7 +497,26 @@ public class CompositeActivatorImpl implements CompositeActivator {
}
compositeContext.bindComponent(runtimeComponent);
+ Implementation implementation = component.getImplementation();
+
+ if (implementation instanceof Composite) {
+ start(compositeContext, (Composite)implementation);
+ } else {
+ for (PolicyProvider policyProvider : runtimeComponent.getPolicyProviders()) {
+ policyProvider.start();
+ }
+ ImplementationProvider implementationProvider = runtimeComponent.getImplementationProvider();
+ if (implementationProvider != null) {
+ implementationProvider.start();
+ }
+ }
+ if (component instanceof ScopedRuntimeComponent) {
+ ScopedRuntimeComponent scopedRuntimeComponent = (ScopedRuntimeComponent)component;
+ if (scopedRuntimeComponent.getScopeContainer() != null) {
+ scopedRuntimeComponent.getScopeContainer().start();
+ }
+ }
// Reference bindings aren't started until the wire is first used
for (ComponentService service : component.getServices()) {
@@ -526,26 +545,6 @@ public class CompositeActivatorImpl implements CompositeActivator {
}
}
- Implementation implementation = component.getImplementation();
- if (implementation instanceof Composite) {
- start(compositeContext, (Composite)implementation);
- } else {
- for (PolicyProvider policyProvider : runtimeComponent.getPolicyProviders()) {
- policyProvider.start();
- }
- ImplementationProvider implementationProvider = runtimeComponent.getImplementationProvider();
- if (implementationProvider != null) {
- implementationProvider.start();
- }
- }
-
- if (component instanceof ScopedRuntimeComponent) {
- ScopedRuntimeComponent scopedRuntimeComponent = (ScopedRuntimeComponent)component;
- if (scopedRuntimeComponent.getScopeContainer() != null) {
- scopedRuntimeComponent.getScopeContainer().start();
- }
- }
-
runtimeComponent.setStarted(true);
}