I deployed the HTTP Session management on WebShpere application as Peer to Peer model. I am trying to reset the defalut session timeout using cache-peer.xml file. However, it shows below error message.
java.lang.RuntimeException: EntryIdleTimeout is not the same
at com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation.sameAs(RegionAttributesCreation.java:391) ~[gemfire-8.0.0.jar:na]
at com.gemstone.gemfire.modules.util.RegionHelper.validateRegion(RegionHelper.java:67) ~[gemfire-modules-8.0.jar:na]
at com.gemstone.gemfire.modules.session.common.PeerToPeerSessionCache.createOrRetrieveRegion(PeerToPeerSessionCache.java:130) ~[gemfire-modules-session-8.0.jar:na]
at com.gemstone.gemfire.modules.session.common.PeerToPeerSessionCache.initialize(PeerToPeerSessionCache.java:72) ~[gemfire-modules-session-8.0.jar:na]
at com.gemstone.gemfire.modules.session.filter.GemfireSessionManager.initializeSessionCache(GemfireSessionManager.java:415) ~[gemfire-modules-session-8.0.jar:na]
at com.gemstone.gemfire.modules.session.filter.GemfireSessionManager.start(GemfireSessionManager.java:132) ~[gemfire-modules-session-8.0.jar:na]
at com.gemstone.gemfire.modules.session.filter.SessionCachingFilter.init(SessionCachingFilter.java:536) ~[gemfire-modules-session-external-8.0.jar:na]
Cache-peer.xml
<region name="gemfire_modules_sessions">
<region-attributes scope="distributed-ack" enable-gateway="false" data policy="replicate" statistics-enabled="true">
<entry-idle-time>
<expiration-attributes timeout="600" action="invalidate"/>
</entry-idle-time>
</region-attributes>
</region>
Any idea? I could not find the defalut setting.
You should not use the region definition to control expiration, but rather the standard deployment descriptor semantics. For example in
web.xml
:The session expiration is still controlled by the native container which will emit the appropriate events when a session is created/destroyed. The GemFire HTTP Session Module registers a
SessionListener
and picks up these events, destroying the underlying cached session as necessary.You can also set the TTL on an individual session through the Servlet API with: