Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/35#discussion_r14503156
--- Diff: core/src/main/java/brooklyn/entity/rebind/RebindManagerImpl.java
---
@@ -385,7 +396,35 @@ public ChangeListener getChangeListener() {
}
}
}
+
+ //
+ // PHASE THREE
+ //
+
+ // Associate policies+enrichers with entities
+ LOG.debug("RebindManager reconstructing entities");
+ for (EntityMemento entityMemento :
sortParentFirst(memento.getEntityMementos()).values()) {
+ Entity entity =
rebindContext.getEntity(entityMemento.getId());
+ if (LOG.isDebugEnabled()) LOG.debug("RebindManager
reconstructing entity {}", entityMemento);
+
+ if (entity == null) {
+ // usually because of creation-failure, when not using
fail-fast
+
exceptionHandler.onEntityNotFound(entityMemento.getId());
+ } else {
+ try {
+ entityMemento.injectTypeClass(entity.getClass());
--- End diff --
this call sticks out a little bit, but i can imagine why it's needed, we're
doing more with the memento now whereas previously we just threw it away
---
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.
---