This is an automated email from the ASF dual-hosted git repository. bross pushed a commit to branch support/1.12 in repository https://gitbox.apache.org/repos/asf/geode.git
commit 924586823d8d45391ad7c8b916c5a5c61fcae3c3 Author: Sarah <sab...@pivotal.io> AuthorDate: Fri Apr 9 11:35:13 2021 -0400 Revert "GEODE-8781: Added ReconnectListener to PeerToPeerSessionCache" This reverts commit 15a2adf58b33c0c70d0e47d417611b36bee74eaf. --- .../modules/session/catalina/DeltaSessionManager.java | 6 +----- .../session/catalina/PeerToPeerSessionCache.java | 19 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java index 0c6f1fd..ec49b5d 100644 --- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java +++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java @@ -533,11 +533,7 @@ public abstract class DeltaSessionManager extends ManagerBase TimerTask task = new TimerTask() { @Override public void run() { - int currentActiveSessions = 0; - try { - currentActiveSessions = getSessionCache().size(); - } catch (Exception ignore) { - } + int currentActiveSessions = getSessionCache().size(); if (currentActiveSessions > getMaxActive()) { setMaxActive(currentActiveSessions); if (getLogger().isDebugEnabled()) { diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java index 04e197d..d5031c1 100644 --- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java +++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java @@ -27,8 +27,6 @@ import org.apache.geode.cache.execute.Execution; import org.apache.geode.cache.execute.Function; import org.apache.geode.cache.execute.FunctionService; import org.apache.geode.cache.execute.ResultCollector; -import org.apache.geode.distributed.internal.InternalDistributedSystem; -import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.modules.session.catalina.callback.LocalSessionCacheLoader; import org.apache.geode.modules.session.catalina.callback.LocalSessionCacheWriter; import org.apache.geode.modules.session.catalina.callback.SessionExpirationCacheListener; @@ -49,7 +47,6 @@ public class PeerToPeerSessionCache extends AbstractSessionCache { public PeerToPeerSessionCache(SessionManager sessionManager, Cache cache) { super(sessionManager); this.cache = cache; - addReconnectListener(); } @Override @@ -245,20 +242,4 @@ public class PeerToPeerSessionCache extends AbstractSessionCache { Execution getExecutionForFunctionOnMembersWithArguments(Object[] arguments) { return FunctionService.onMembers().setArguments(arguments); } - - private void addReconnectListener() { - InternalDistributedSystem.addReconnectListener( - new InternalDistributedSystem.ReconnectListener() { - @Override - public void onReconnect(InternalDistributedSystem oldSystem, - InternalDistributedSystem newSystem) { - reinitialize(newSystem.getCache()); - } - }); - } - - private void reinitialize(InternalCache reconnectedCache) { - this.cache = reconnectedCache; - initialize(); - } }