brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #799: Uninstall bundles on error
Date Tue, 29 Aug 2017 15:31:25 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/799#discussion_r135826869
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
---
    @@ -1034,25 +1065,21 @@ private String setFromItemIfUnset(String oldValue, Map<?,?>
item, String fieldAt
         }
         
         @SuppressWarnings("unused")  // keep during 0.12.0 until we are decided we won't
support this; search for this method name
    -    // note that it breaks after rebind since we don't have the JAR -- see notes below
    +    // (note that this now could work after rebind since we have the OSGi cache)
         private Collection<CatalogItemDtoAbstract<?, ?>> scanAnnotationsInBundle(ManagementContext
mgmt, ManagedBundle containingBundle) {
             CatalogDto dto = CatalogDto.newNamedInstance("Bundle "+containingBundle.getVersionedName().toOsgiString()+"
Scanned Catalog", "All annotated Brooklyn entities detected in bundles", "scanning-bundle-"+containingBundle.getVersionedName().toOsgiString());
             CatalogDo subCatalog = new CatalogDo(dto);
             // need access to a JAR to scan this
             String url = null;
    -        if (containingBundle instanceof BasicManagedBundle) {
    -            File f = ((BasicManagedBundle)containingBundle).getTempLocalFileWhenJustUploaded();
    -            if (f!=null) {
    -                url = "file:"+f.getAbsolutePath();
    -            }
    +        File f = ((ManagementContextInternal)mgmt).getOsgiManager().get().getBundleFile(containingBundle);
    +        if (f!=null) {
    +            url = "file:"+f.getAbsolutePath();
    --- End diff --
    
    +1



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