@Override public void doStop() throws Exception { // override doStop() and invalidatedSessions() to skip invoking NoSqlSessionManager#invalidatedSeessions() // we do not want to invalidate all sessions on servlets restart. log.info("stopping..."); super.doStop(); log.info("stopped."); }
@Override public void setSessionIdManager(final SessionIdManager idManager) { try { KeyValueStoreSessionIdManager kvsIdManager = (KeyValueStoreSessionIdManager) idManager; super.setSessionIdManager(kvsIdManager); } catch (ClassCastException error) { log.warn("unable to cast " + idManager.getClass() + " to " + KeyValueStoreSessionIdManager.class + "."); throw (error); } }
@Override public void doStart() throws Exception { LOG.info("HazelcastSessionManager.doStart()"); super.doStart(); String[] hosts = getContextHandler().getVirtualHosts(); if (hosts == null || hosts.length == 0) { // IPv6 equiv of 0.0.0.0 hosts = new String[]{"::"}; } String contextPath = getContext().getContextPath(); if (contextPath == null || "".equals(contextPath)) { contextPath = "*"; } LOG.debug("HazelcastSessionManager:doStart():contextpath: " + contextPath); contextId = createContextId(hosts, contextPath); LOG.debug("HazelcastSessionManager:doStart():contextId: " + contextId); sessions = ((HazelcastSessionIdManager) getSessionIdManager()).getSessions(); }
@Override protected void expire(String idInCluster) { super.expire(idInCluster); /* * pull back the 'valid' value, we can check if its false, if is we don't need to reset it to false */ HazelcastSessionData o = sessions.get(idInCluster); if (o != null && o.isValid()) { o.setValid(false); sessions.set(idInCluster, o); } }
super.doStart(); if (_cookieDomain == null)