Entry oldEntry = map.put(key, entry);
if (oldEntry != null && (oldEntry.getValue() instanceof ContextLifecycle)) {
((ContextLifecycle) oldEntry.value).contextChanged(value);
}
if (entry.getValue() instanceof ContextLifecycle) {
ContextLifecycle ctx = (ContextLifecycle) entry.getValue();
if (addedContexts == null) {
ctx.contextAdded();
} else {
addedContexts.add(ctx);
}
}
if (logger.isLoggable(Level.DEBUG)) {