if (event.getType() == Container.ADD_CHILD_EVENT) {
Container child = (Container) event.getData();
child.addLifecycleListener(this);
+ child.addContainerListener(this);
if (child instanceof Host) {
registerHost((Host) child);
} else if (child instanceof Context) {
}
} else if (event.getType() == Container.REMOVE_CHILD_EVENT) {
Container child = (Container) event.getData();
- child.removeLifecycleListener(this);
+ removeListeners(child);
if (child instanceof Host) {
unregisterHost((Host) child);
} else if (child instanceof Context) {
*/
private void unregisterHost(Host host) {
- removeListeners(host);
-
String hostname = host.getName();
mapper.removeHost(hostname);
*/
private void unregisterWrapper(Wrapper wrapper) {
- removeListeners(wrapper);
-
String contextName = wrapper.getParent().getName();
if ("/".equals(contextName)) {
contextName = "";
return;
}
- removeListeners(context);
-
String contextName = context.getName();
if ("/".equals(contextName)) {
contextName = "";