com.hazelcast.web.package-info Maven / Gradle / Ivy
Show all versions of hazelcast-wm Show documentation
/*
* Copyright 2024 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
/**
*
* Provides Hazelcast-based session replication.
*
* To use Hazelcast to provide clustered sessions in a webapp, add the following components to your {@code web.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>
*
*
* {@link com.hazelcast.web.WebFilter 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
* {@link com.hazelcast.web.WebFilter WebFilter} and {@link com.hazelcast.web.SessionListener SessionListener}
* must be registered for clustered sessions to work properly. The {@code SessionListener} informs the
* {@code WebFilter} of session timeouts so it can update the cluster accordingly.
*
*
* {@link com.hazelcast.web.WebFilter WebFilter} supports several {@code <init-param/>} values which can
* be used to control its behavior. For more details, check its documentation.
*
*/
package com.hazelcast.web;