@Override protected void destroySession(HazelcastHttpSession session, boolean invalidate) { super.destroySession(session, invalidate); if (invalidate) { ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext); if (appContext != null) { ensureSessionRegistryInitialized(appContext); if (sessionRegistry != null) { String originalSessionId = session.getOriginalSessionId(); // If original session id is registered already, we don't need it. // So, we should remove it also. sessionRegistry.removeSessionInformation(originalSessionId); /** * Publish an event to notify * {@link org.springframework.security.core.session.SessionRegistry} instance. * So Spring clears information about our Hazelcast session. */ appContext.publishEvent(new HttpSessionDestroyedEvent(session)); LOGGER.finest("Published destroy session event for Spring for session with id " + session.getId()); } } } }
@Override protected void destroySession(HazelcastHttpSession session, boolean invalidate) { super.destroySession(session, invalidate); if (invalidate) { ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext); if (appContext != null) { ensureSessionRegistryInitialized(appContext); if (sessionRegistry != null) { String originalSessionId = session.getOriginalSessionId(); // If original session id is registered already, we don't need it. // So, we should remove it also. sessionRegistry.removeSessionInformation(originalSessionId); /** * Publish an event to notify * {@link org.springframework.security.core.session.SessionRegistry} instance. * So Spring clears information about our Hazelcast session. */ appContext.publishEvent(new HttpSessionDestroyedEvent(session)); LOGGER.finest("Published destroy session event for Spring for session with id " + session.getId()); } } } }
ensureSessionRegistryInitialized(appContext); if (sessionRegistry != null && session != null) { String originalSessionId = session.getOriginalSessionId();
ensureSessionRegistryInitialized(appContext); if (sessionRegistry != null && session != null) { String originalSessionId = session.getOriginalSessionId();