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

    https://github.com/apache/incubator-brooklyn/pull/617#discussion_r30578042
  
    --- Diff: core/src/main/java/brooklyn/entity/rebind/RebindIteration.java ---
    @@ -341,38 +340,67 @@ protected void rebuildCatalog() {
                     }
                 }
             }
    +
    +        // See notes in CatalogInitialization
             
    -        // Register catalogue items with the management context. Loads the 
bundles in the OSGi framework.
    -        CatalogLoadMode catalogLoadMode = 
managementContext.getConfig().getConfig(BrooklynServerConfig.CATALOG_LOAD_MODE);
    +        Collection<CatalogItem<?, ?>> catalogItems = 
rebindContext.getCatalogItems();
    +        CatalogInitialization catInit = 
((ManagementContextInternal)managementContext).getCatalogInitialization();
    +        catInit.injectManagementContext(managementContext);
    --- End diff --
    
    Why would we have to inject the management context here, when we've 
obtained the instance by calling  
`managementContext.getCatalogInitialization()`? That should return an instance 
which already has the management context.


---
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