@Override
    public void contextDestroyed(ServletContextEvent arg0) {
        if (endpointManager != null) {
            if (!FrameworkState.isStopping()) {
                endpointManager.closeAllOpenSessions();
                endpointManager.clear();
            }
            else {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Server is being shutdown, no need to stop stop clients");
                }
            }
        }

    }
@ Override public void contextDestroyed ( ServletContextEvent arg0 ) { if ( endpointManager != null ) { if ( ! FrameworkState . isStopping ( ) ) { endpointManager . closeAllOpenSessions ( ) ; endpointManager . clear ( ) ; } else { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Server is being shutdown, no need to stop stop clients" ) ; } } } }
/*
(non-Javadoc)

@see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)