Author: slaws
Date: Fri Jun 10 08:05:58 2011
New Revision: 1134223

URL: http://svn.apache.org/viewvc?rev=1134223&view=rev
Log:
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)

Modified:
    
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java

Modified: 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java?rev=1134223&r1=1134222&r2=1134223&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
 Fri Jun 10 08:05:58 2011
@@ -427,6 +427,8 @@ public class CompositeActivatorImpl impl
             // 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 impl
             providers.clear();
         }
 
+        // mark a successful start
         runtimeComponent.setStarted(true);
     }
 
@@ -528,6 +531,7 @@ public class CompositeActivatorImpl impl
                 scopedRuntimeComponent.getScopeContainer().start();
             } catch (Throwable ex){
                 Monitor.error(monitor, this, "core-messages", 
"StartException", ex);
+                rethrow(ex);
             }             
         }
     }
@@ -547,6 +551,7 @@ public class CompositeActivatorImpl impl
                     providers.add(policyProvider);
                 } catch (Throwable ex){
                     Monitor.error(monitor, this, "core-messages", 
"StartException", ex);
+                    rethrow(ex);
                 }                     
             }
         }
@@ -568,6 +573,7 @@ public class CompositeActivatorImpl impl
                 compositeContext.getEndpointRegistry().addEndpoint(ep);
             } catch (Throwable ex){
                 Monitor.error(monitor, this, "core-messages", 
"StartException", ex);
+                rethrow(ex);
             }  
         }
     }
@@ -627,6 +633,7 @@ public class CompositeActivatorImpl impl
                         start(compositeContext, epr);
                     } catch (Throwable ex){
                         Monitor.error(monitor, this, "core-messages", 
"StartException", ex);
+                        rethrow(ex);
                     }  
                 }
             }


Reply via email to