brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #608: `BundleMaker` REST call allowing to add Z...
Date Thu, 23 Mar 2017 17:38:58 GMT
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/608#discussion_r107735126
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
---
    @@ -195,22 +210,29 @@ public void removedBundle(Bundle bundle, BundleEvent bundleEvent,
Iterable<? ext
                 for (CatalogItem<?, ?> item : items) {
                     LOG.debug("Unloading {} {} from catalog", item.getSymbolicName(), item.getVersion());
     
    -                removeFromCatalog(item);
    +                catalogBundleLoader.removeFromCatalog(item);
                 }
             }
    +    }
     
    -        private void removeFromCatalog(CatalogItem<?, ?> item) {
    -            try {
    -                getManagementContext().getCatalog().deleteCatalogItem(item.getSymbolicName(),
item.getVersion());
    -            } catch (Exception e) {
    -                Exceptions.propagateIfFatal(e);
    -                LOG.warn(Strings.join(new String[] {
    -                    "Failed to remove", item.getSymbolicName(), item.getVersion(), "from
catalog"
    -                }, " "), e);
    -            }
    +    @Beta
    +    public class CatalogBundleLoader {
    --- End diff --
    
    We should also remove the changes introduced in 33f7940c18ba8cd17fd83500486e02376d3b8fd8
to CatalogPopulator, i.e. adding the `CatalogPopulator(BundleContext bundleContext, ManagementContext
managementContext) ` constructor and `bundleContext` member variable, and re-simplifying `open()`
and `close()` and anything else that uses them.  Those changes were introduced for the purposes
of this PR, but are not needed now that the new class has been factored out.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message