Book Image

Getting Started with Hazelcast

By : Matthew Johns
Book Image

Getting Started with Hazelcast

By: Matthew Johns

Overview of this book

Table of Contents (18 chapters)
Getting Started with Hazelcast
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Web session storage


Another complementary piece of functionality is the ability to provide session persistence to a web application. These are normally provided by the application container, but these typically have replication or scalability issues with large deployments. This problem tends to be addressed through the use of "sticky sessions" where a load balancer sitting in front of the application routes related traffic through to the same container; but what would happen in a failure situation? If the container did not feature any form of replication, the session would be lost and a negative customer experience would be encountered.

Hazelcast can help address this issue by providing an external and distributed session store for our application. By including hazelcast-wm-2.6.jar in our web application and configuring the web.xml file, we can provide session persistence using a web application filter. In the case that your application uses multiple filters, make sure that this is the first...