geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject incubator-geode git commit: GEODE-1675: Fix ClassCastException in ClientServer expiry
Date Thu, 18 Aug 2016 22:12:52 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop e25ba5c08 -> 306fda086


GEODE-1675: Fix ClassCastException in ClientServer expiry

* Also fix for NPE if session manager somehow is null in a session
* Added tests for client/server session management
* Refactored existing tests so they can share tests with client/server set up


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/306fda08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/306fda08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/306fda08

Branch: refs/heads/develop
Commit: 306fda0860218e5a80f3064c55b04396e9e653d1
Parents: e25ba5c
Author: Jason Huynh <huynhja@gmail.com>
Authored: Wed Aug 17 15:28:31 2016 -0700
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Thu Aug 18 14:32:26 2016 -0700

----------------------------------------------------------------------
 .../modules/session/catalina/DeltaSession8.java |  5 +-
 .../session/TestSessionsTomcat8Base.java        | 54 +++--------
 .../Tomcat8SessionsClientServerDUnitTest.java   | 96 ++++++++++++++++++++
 .../session/Tomcat8SessionsDUnitTest.java       | 77 ++++++++++++++++
 .../session/Tomcat8SessionsJUnitTest.java       | 32 -------
 .../session/bootstrap/AbstractCache.java        |  4 +-
 .../session/bootstrap/ClientServerCache.java    |  2 +-
 .../session/bootstrap/PeerToPeerCache.java      |  2 +-
 .../modules/session/catalina/DeltaSession.java  |  5 +-
 .../session/catalina/DeltaSessionInterface.java |  1 +
 .../SessionExpirationCacheListener.java         |  5 +-
 11 files changed, 197 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules-tomcat8/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession8.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession8.java
b/extensions/geode-modules-tomcat8/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession8.java
index aa07b5b..0b9f58f 100644
--- a/extensions/geode-modules-tomcat8/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession8.java
+++ b/extensions/geode-modules-tomcat8/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession8.java
@@ -309,9 +309,11 @@ public class DeltaSession8 extends StandardSession implements DataSerializable,
   }
 
   public void processExpired() {
-    if (((DeltaSessionManager) getManager()).getLogger().isDebugEnabled()) {
+    DeltaSessionManager manager = (DeltaSessionManager) getManager();
+    if (manager != null && manager.getLogger() != null && manager.getLogger().isDebugEnabled())
{
       ((DeltaSessionManager) getManager()).getLogger().debug(this + ": Expired");
     }
+
     // Set expired (so region.destroy is not called again)
     setExpired(true);
 
@@ -319,7 +321,6 @@ public class DeltaSession8 extends StandardSession implements DataSerializable,
     expire();
 
     // Update statistics
-    DeltaSessionManager manager = (DeltaSessionManager) getManager();
     if (manager != null) {
       manager.getStatistics().incSessionsExpired();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsTomcat8Base.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsTomcat8Base.java
b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsTomcat8Base.java
index 76b301d..f8604bf 100644
--- a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsTomcat8Base.java
+++ b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsTomcat8Base.java
@@ -35,60 +35,28 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
 
+import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.modules.session.catalina.ClientServerCacheLifecycleListener;
 import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
-import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 
-public abstract class TestSessionsTomcat8Base {
+public abstract class TestSessionsTomcat8Base extends JUnit4DistributedTestCase{
 
-  private static EmbeddedTomcat8 server;
+  protected static EmbeddedTomcat8 server;
 
-  private static Region<String, HttpSession> region;
+  protected static Region<String, HttpSession> region;
 
-  private static StandardWrapper servlet;
+  protected static StandardWrapper servlet;
 
-  private static DeltaSessionManager sessionManager;
+  protected static DeltaSessionManager sessionManager;
 
-  private static int port;
+  protected static int port;
 
-  // Set up the servers we need
-  public static void setupServer(DeltaSessionManager manager) throws Exception {
-    port = AvailablePortHelper.getRandomAvailableTCPPort();
-    server = new EmbeddedTomcat8("/test", port, "JVM-1");
+  protected Cache cache;
 
-    PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
-    p2pListener.setProperty(MCAST_PORT, "0");
-    p2pListener.setProperty(LOG_LEVEL, "config");
-    server.addLifecycleListener(p2pListener);
-    sessionManager = manager;
-    sessionManager.setEnableCommitValve(true);
-    server.getRootContext().setManager(sessionManager);
+  protected VM vm0;
 
-    servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
-    server.startContainer();
-
-    /*
-     * Can only retrieve the region once the container has started up
-     * (and the cache has started too).
-     */
-    region = sessionManager.getSessionCache().getSessionRegion();
-  }
-
-  @AfterClass
-  public static void teardownClass() throws Exception {
-    server.stopContainer();
-  }
-
-  /**
-   * Reset some data
-   */
-  @Before
-  public void setup() throws Exception {
-    sessionManager.getTheContext().setSessionTimeout(30);
-    region.clear();
-  }
 
   /**
    * Check that the basics are working

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsClientServerDUnitTest.java
b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsClientServerDUnitTest.java
new file mode 100644
index 0000000..ca9cdbe
--- /dev/null
+++ b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsClientServerDUnitTest.java
@@ -0,0 +1,96 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.cache.CacheServerLauncher.serverPort;
+
+import java.util.Properties;
+
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.modules.session.catalina.ClientServerCacheLifecycleListener;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
+import com.gemstone.gemfire.modules.session.catalina.Tomcat8DeltaSessionManager;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(DistributedTest.class)
+public class Tomcat8SessionsClientServerDUnitTest extends TestSessionsTomcat8Base {
+
+  // Set up the session manager we need
+  @Override
+  public void postSetUp() throws Exception {
+    setupServer(new Tomcat8DeltaSessionManager());
+  }
+
+  @Override
+  public void preTearDown() {
+    vm0.invoke(() -> {
+      GemFireCacheImpl.getInstance().getCacheServers().forEach(e -> ((CacheServer)e).stop());
+    });
+    server.stopContainer();
+  }
+
+  // Set up the servers we need
+  public void setupServer(DeltaSessionManager manager) throws Exception {
+    Host host = Host.getHost(0);
+    vm0 = host.getVM(1);
+    String hostName = vm0.getHost().getHostName();
+    int cacheServerPort = vm0.invoke(() -> {
+      Properties props = new Properties();
+      CacheFactory cf = new CacheFactory(props);
+      Cache cache = cf.create();
+      CacheServer server = cache.addCacheServer();
+      server.start();
+      return server.getPort();
+    });
+
+    port = AvailablePortHelper.getRandomAvailableTCPPort();
+    server = new EmbeddedTomcat8("/test", port, "JVM-1");
+
+    ClientServerCacheLifecycleListener listener = new ClientServerCacheLifecycleListener();
+    listener.setProperty(MCAST_PORT, "0");
+    listener.setProperty(LOG_LEVEL, "config");
+    server.addLifecycleListener(listener);
+    sessionManager = manager;
+    sessionManager.setEnableCommitValve(true);
+    server.getRootContext().setManager(sessionManager);
+
+    servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
+    server.startContainer();
+
+    PoolFactory pf = PoolManager.createFactory();
+    pf.addServer(hostName, cacheServerPort);
+    pf.create("Pool Connecting to Cache Server");
+
+    /*
+     * Can only retrieve the region once the container has started up
+     * (and the cache has started too).
+     */
+    region = sessionManager.getSessionCache().getSessionRegion();
+    sessionManager.getTheContext().setSessionTimeout(30);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsDUnitTest.java
b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsDUnitTest.java
new file mode 100644
index 0000000..e573c4e
--- /dev/null
+++ b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsDUnitTest.java
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
+import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
+import com.gemstone.gemfire.modules.session.catalina.Tomcat8DeltaSessionManager;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+@Category(DistributedTest.class)
+public class Tomcat8SessionsDUnitTest extends TestSessionsTomcat8Base {
+
+  // Set up the session manager we need
+  @Override
+  public void postSetUp() throws Exception {
+    setupServer(new Tomcat8DeltaSessionManager());
+  }
+
+  @Override
+  public void preTearDown() throws Exception {
+    server.stopContainer();
+  }
+
+  public void setupServer(DeltaSessionManager manager) throws Exception {
+    port = AvailablePortHelper.getRandomAvailableTCPPort();
+    server = new EmbeddedTomcat8("/test", port, "JVM-1");
+
+    PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
+    p2pListener.setProperty(MCAST_PORT, "0");
+    p2pListener.setProperty(LOG_LEVEL, "config");
+    server.addLifecycleListener(p2pListener);
+    sessionManager = manager;
+    sessionManager.setEnableCommitValve(true);
+    server.getRootContext().setManager(sessionManager);
+
+    servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
+    server.startContainer();
+
+    /*
+     * Can only retrieve the region once the container has started up
+     * (and the cache has started too).
+     */
+    region = sessionManager.getSessionCache().getSessionRegion();
+  }
+
+  /**
+   * Reset some data
+   */
+  @Before
+  public void setup() throws Exception {
+    sessionManager.getTheContext().setSessionTimeout(30);
+    region.clear();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsJUnitTest.java
b/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsJUnitTest.java
deleted file mode 100644
index df65690..0000000
--- a/extensions/geode-modules-tomcat8/src/test/java/com/gemstone/gemfire/modules/session/Tomcat8SessionsJUnitTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package com.gemstone.gemfire.modules.session;
-
-import com.gemstone.gemfire.modules.session.catalina.Tomcat8DeltaSessionManager;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.junit.BeforeClass;
-import org.junit.experimental.categories.Category;
-
-@Category(UnitTest.class)
-public class Tomcat8SessionsJUnitTest extends TestSessionsTomcat8Base {
-
-  // Set up the session manager we need
-  @BeforeClass
-  public static void setupClass() throws Exception {
-    setupServer(new Tomcat8DeltaSessionManager());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
index c14f829..9704853 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
@@ -90,9 +90,7 @@ public abstract class AbstractCache {
         rebalanceCache();
       }
     } else if (eventType.equals(LifecycleTypeAdapter.STOP)) {
-      // Close the cache
-//      closeCache();
-      // TODO: Do we need to reset the started flag here?
+      started.set(false);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
index f8cff16..a4bd7a5 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
@@ -52,7 +52,7 @@ public class ClientServerCache extends AbstractCache {
 
     // If no cache exists, create one
     String message = null;
-    if (this.cache == null) {
+    if (this.cache == null || this.cache.isClosed()) {
       // enable pool subscription so that default cache can be used by hibernate module
       this.cache = new ClientCacheFactory(createDistributedSystemProperties()).create();
       message = "Created ";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
index b0b3b4a..92c5f1f 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
@@ -55,7 +55,7 @@ public class PeerToPeerCache extends AbstractCache {
 
     // If no cache exists, create one
     String message = null;
-    if (this.cache == null) {
+    if (this.cache == null || cache.isClosed()) {
       this.cache = new CacheFactory(createDistributedSystemProperties()).create();
       message = "Created ";
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
index ff7133d..754376a 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
@@ -317,9 +317,11 @@ public class DeltaSession extends StandardSession implements DataSerializable,
D
   }
 
   public void processExpired() {
-    if (((DeltaSessionManager) getManager()).getLogger().isDebugEnabled()) {
+    DeltaSessionManager manager = (DeltaSessionManager) getManager();
+    if (manager != null && manager.getLogger() != null && manager.getLogger().isDebugEnabled())
{
       ((DeltaSessionManager) getManager()).getLogger().debug(this + ": Expired");
     }
+
     // Set expired (so region.destroy is not called again)
     setExpired(true);
 
@@ -327,7 +329,6 @@ public class DeltaSession extends StandardSession implements DataSerializable,
D
     expire();
 
     // Update statistics
-    DeltaSessionManager manager = (DeltaSessionManager) getManager();
     if (manager != null) {
       manager.getStatistics().incSessionsExpired();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionInterface.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionInterface.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionInterface.java
index 1d3d1f7..a293432 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionInterface.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionInterface.java
@@ -49,4 +49,5 @@ public interface DeltaSessionInterface extends Session {
   void setOwner(Object manager);
   void activate();
 
+  void processExpired();
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/306fda08/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
index 5893c95..4fd1136 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionInterface;
 import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
 import com.gemstone.gemfire.modules.util.ContextMapper;
 
@@ -35,9 +36,9 @@ public class SessionExpirationCacheListener extends CacheListenerAdapter<String,
     // A Session expired. If it was destroyed by GemFire expiration, process it.
     // If it was destroyed via Session.invalidate, ignore it since it has
     // already been processed.
-    DeltaSession session = null;
+    DeltaSessionInterface session = null;
     if (event.getOperation() == Operation.EXPIRE_DESTROY) {
-      session = (DeltaSession) event.getOldValue();
+      session = (DeltaSessionInterface) event.getOldValue();
     } else {
       /*
        * This comes into play when we're dealing with an empty client proxy. We


Mime
View raw message