| Class | Description |
|---|---|
| ClusteredSessionService |
ClusteredSessionService is a proxy class which delegates all
operations on distributed map to hazelcast cluster used for session
replication.
|
| HazelcastHttpSession |
HazelcastHttpSession is HttpSession implementation based on Hazelcast Imap.
|
| LocalCacheEntry |
LocalCacheEntry which is used store cache entries inside
WebFilter |
| SessionListener |
Pairs with
WebFilter to notify it of HttpSession timeouts. |
| SessionState |
Wrapper class which holds session attributes
|
| WebDataSerializerHook |
WebDataSerializerHook is used to create IdentifiedDataSerializable instances of serializable classes
in Hazelcast Filter Based Session Replication Module
|
| WebFilter |
Provides clustered sessions by backing session data with an
IMap. |
| WebFilterConfig |
Contains all configuration parameters for Hazelcast session replication
|
Provides Hazelcast-based session replication.
To use Hazelcast to provide clustered sessions in a webapp, add the following components to yourweb.xml:
<filter> <filter-name>hazelcastWebFilter</filter-name> <filter-class>com.hazelcast.web.WebFilter</filter-class> </filter> <filter-mapping> <filter-name>hazelcastWebFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping> <listener> <listener-class>com.hazelcast.web.SessionListener</listener-class> </listener>
WebFilter should be first in the filter chain to ensure session
actions performed in other filters in the chain are replicated. Additionally, note that both the
WebFilter and SessionListener
must be registered for clustered sessions to work properly. The SessionListener informs the
WebFilter of session timeouts so it can update the cluster accordingly.
WebFilter supports several <init-param/> values which can
be used to control its behavior. For more details, check its documentation.
Copyright © 2020. All Rights Reserved.