class AmbariHandlerList extends HandlerCollection implements ViewInstanceHandlerList {

  @Override
  public void addViewInstance(ViewInstanceEntity viewInstanceDefinition) throws SystemException {
    WebAppContext handler = getHandler(viewInstanceDefinition);
    viewHandlerMap.put(viewInstanceDefinition, handler);
    super.addHandler(handler);
    // if this is running then start the handler being added...
    if(!isStopped() && !isStopping()) {
      try {
        handler.start();
      } catch (Exception e) {
        throw new SystemException("Caught exception adding a view instance.", e);
      }
    }
    handler.getSessionHandler().setSessionCache(sessionHandler.getSessionCache());
  }

  public  AmbariHandlerList();

}