Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/506#discussion_r24325712
  
    --- Diff: core/src/main/java/brooklyn/entity/rebind/RebindManagerImpl.java 
---
    @@ -361,6 +364,38 @@ public void stop() {
             if (persistenceStoreAccess != null) 
persistenceStoreAccess.stop(true);
         }
         
    +        
    +    public void rebindPartialActive(CompoundTransformer transformer, 
Iterator<BrooklynObject> objectsToRebind) {
    +        final ClassLoader classLoader = 
    +            managementContext.getCatalog().getRootClassLoader();
    +        final RebindExceptionHandler exceptionHandler = 
    +            RebindExceptionHandlerImpl.builder()
    +                .danglingRefFailureMode(danglingRefFailureMode)
    --- End diff --
    
    Do we definitely want to use the same exception handler as was used at 
start-up? What happens if there is an unhandled exception? What state will the 
entities be left in? I presume that if the exception is early (e.g. when 
loading/transforming state etc) then it's like a no-op, but if during the 
entity's manage() then we'll have changed some entities but not others?
    
    Doing the partial-rebind at run-time feels more dangerous than at startup 
so possibly want different exception handling (e.g. on startup, might be happy 
to fail-fast, so JVM exits).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to