ahgittin commented on code in PR #1325:
URL: https://github.com/apache/brooklyn-server/pull/1325#discussion_r907462662
##########
core/src/main/java/org/apache/brooklyn/core/entity/Entities.java:
##########
@@ -948,10 +955,22 @@ public static ManagementContext
startManagement(Application app, ManagementConte
}
}
+ premanageRecursively((ManagementContextInternal)mgmt, app);
+
mgmt.getEntityManager().manage(app);
return mgmt;
}
+ private static void premanageRecursively(ManagementContextInternal mgmt,
Entity e) {
+ if (Entities.isUnmanagingOrNoLongerManaged(e) ||
Entities.isManagedActive(e)) {
+ log.warn("Skipping premanagement for "+e+", as it has some form of
known management");
+ // skip for active and unmanaged entities
+ return;
+ }
+ mgmt.prePreManage(e);
Review Comment:
this method is called `premanageRecursively` so i think the answer is yes.
this is only needed for legacy code (tests), which does want the recursive
behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]