diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-10 08:05:58 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-10 08:05:58 +0000 |
commit | fb9bf6845595286c631086e32fb2505c06bdd926 (patch) | |
tree | 21795f8fa364e1052b46051823e62193ad153481 /sca-java-2.x/trunk/modules/core | |
parent | 65797038a665f02cb37349c36f9a5a151d3d1f8a (diff) |
TUSCANY-3867 - Add rethrows back in the start processing as we don;t want to blindly carry on starting things (as we do with stop processing)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1134223 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java index 367c082839..49c72aa267 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java @@ -427,6 +427,8 @@ public class CompositeActivatorImpl implements CompositeActivator { // is up and running before we try and connect references to services } catch (Throwable e) { + // any providers (binding, implementation, policy) that were started + // before the error occured are stopped here for (int i = providers.size() - 1; i >= 0; i--) { try { providers.get(i).stop(); @@ -439,6 +441,7 @@ public class CompositeActivatorImpl implements CompositeActivator { providers.clear(); } + // mark a successful start runtimeComponent.setStarted(true); } @@ -528,6 +531,7 @@ public class CompositeActivatorImpl implements CompositeActivator { scopedRuntimeComponent.getScopeContainer().start(); } catch (Throwable ex){ Monitor.error(monitor, this, "core-messages", "StartException", ex); + rethrow(ex); } } } @@ -547,6 +551,7 @@ public class CompositeActivatorImpl implements CompositeActivator { providers.add(policyProvider); } catch (Throwable ex){ Monitor.error(monitor, this, "core-messages", "StartException", ex); + rethrow(ex); } } } @@ -568,6 +573,7 @@ public class CompositeActivatorImpl implements CompositeActivator { compositeContext.getEndpointRegistry().addEndpoint(ep); } catch (Throwable ex){ Monitor.error(monitor, this, "core-messages", "StartException", ex); + rethrow(ex); } } } @@ -627,6 +633,7 @@ public class CompositeActivatorImpl implements CompositeActivator { start(compositeContext, epr); } catch (Throwable ex){ Monitor.error(monitor, this, "core-messages", "StartException", ex); + rethrow(ex); } } } |