private void bruteForceCleanup(String realId, Exception ex) { log_.warn("Standard expiration of session " + realId + " failed; switching to a brute " + "force cleanup. Problem is" + ex.getLocalizedMessage()); try { proxy_.removeSessionLocal(realId, null); } catch (Exception e) { log_.error("processExpirationPassivation(): Caught exception " + "during brute force cleanup of unloaded session " + realId + " session will be removed from Manager " + "but may still exist in distributed cache", e); } finally { // Get rid of our refs even if distributed store fails unloadedSessions_.remove(realId); stats_.removeStats(realId); } }
stats_.removeStats(realId); stats_.removeStats(realId);
/** * Removes the session from this Manager's collection of actively managed * sessions. Also removes the session from the distributed cache, both on * this server and on all other server to which this one replicates. */ public void remove(Session session) { ClusteredSession clusterSess = (ClusteredSession) session; synchronized (clusterSess) { String realId = clusterSess.getRealId(); if (realId == null) return; if (log_.isDebugEnabled()) { log_.debug("Removing session from store with id: " + realId); } try { // Ignore any cache notifications that our own work generates ConvergedSessionReplicationContext.startCacheActivity(); clusterSess.removeMyself(); } finally { ConvergedSessionReplicationContext.finishCacheActivity(); // We don't want to replicate this session at the end // of the request; the removal process took care of that ConvergedSessionReplicationContext.sessionExpired(clusterSess, realId, snapshotManager_); sessions_.remove(realId); stats_.removeStats(realId); activeCounter_--; } } }
stats_.removeStats(realId);
stats_.removeStats(realId);
/** * {@inheritDoc} */ public MobicentsSipSession removeSipSession(final MobicentsSipSessionKey key) { ClusteredSipSession clusterSess = (ClusteredSipSession) sipManagerDelegate.removeSipSession(key); if(clusterSess == null) { return null; } synchronized (clusterSess) { final String realId = clusterSess.getId(); if (log_.isDebugEnabled()) { log_.debug("Removing session from store with id: " + realId); } try { // Ignore any cache notifications that our own work generates ConvergedSessionReplicationContext.startSipCacheActivity(); clusterSess.removeMyself(); } finally { ConvergedSessionReplicationContext.finishSipCacheActivity(); // We don't want to replicate this session at the end // of the request; the removal process took care of that ConvergedSessionReplicationContext.sipSessionExpired(clusterSess, realId, snapshotManager_); stats_.removeStats(realId); activeCounter_--; } } return clusterSess; }
/** * {@inheritDoc} */ public MobicentsSipApplicationSession removeSipApplicationSession( final MobicentsSipApplicationSessionKey key) { ClusteredSipApplicationSession clusterSess = (ClusteredSipApplicationSession) sipManagerDelegate.removeSipApplicationSession(key); if(clusterSess == null) { return null; } synchronized (clusterSess) { final String realId = clusterSess.getId(); if (log_.isDebugEnabled()) { log_.debug("Removing session from store with id: " + realId); } try { // Ignore any cache notifications that our own work generates ConvergedSessionReplicationContext.startSipCacheActivity(); clusterSess.removeMyself(); } finally { ConvergedSessionReplicationContext.finishSipCacheActivity(); // We don't want to replicate this session at the end // of the request; the removal process took care of that ConvergedSessionReplicationContext.sipApplicationSessionExpired(clusterSess, realId, snapshotManager_); stats_.removeStats(realId); activeCounter_--; } } return clusterSess; }
stats_.removeStats(realId);