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

    https://github.com/apache/incubator-brooklyn/pull/617#discussion_r30583757
  
    --- Diff: 
usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java ---
    @@ -682,6 +676,8 @@ private void initManagementContext() {
                 brooklynProperties.addFromMap(brooklynAdditionalProperties);
             }
             
    +        
((ManagementContextInternal)managementContext).setCatalogInitialization(catalogInitialization);
    --- End diff --
    
    Overall I'm ok with this, but I do have a gut feeling that I don't like us 
injecting the `catalogInitialization`.
    
    It feels like we want to inject config to control the catalog 
initialization. That could be used to configure the actual 
catalogInitialization object, which would be purely internal.
    
    Injecting a full-blown `CatalogInitialization` object is obviously more 
flexible, but the contract of what that object must do is not very well defined 
for it to be on an interface. I'd expect we'd only want to inject a different 
impl in tests, or in really extreme cases. If we really want to support that 
kind of thing, we should think seriously about a dependency injection framework.


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