Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/890#discussion_r41536794
--- Diff:
core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
---
@@ -268,9 +270,26 @@ public void manage(Entity e) {
new Exception("source of duplicate management of "+e));
return;
}
+ // Validate all config before attempting to manage any entity. Do
this here rather
+ // than in manageRecursive so that rebind is unaffected.
+ validateDescendantConfig(e);
--- End diff --
Only that this came first and the idea was to do validate constraints
pre-management. You're right that it's better in the entity factory. As an
added bonus, this makes an execution context available for the `getNonBlocking`
suggestion.
---
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.
---