code: @Override
    public void contextInitialized(ServletContextEvent event) {
      this.event = event;
      this.serverContainer = getServerContainer(event);
      super.contextInitialized(event);
    }
docs: On contextInitialized additional obtain the WebSocket ServerContainer.