Saturday, August 1, 2009

Enable session failover in clusters

Sometimes its necessary to synchronize the whole session between two (or more) cluster members. Especially when some important attributes are stored in the session (search,...).
WebSphere offers an option called "Session Replication" to avoid the lost of a session because of a crashed Cluster Member.


First you need to setup a replication domain for the cluster
1.1. Go to Enviroment > Replication domains > New
1.2. Type in the name of the replication domain and click OK
1.3. Save & synchronize changes

Now its possible to setup the session replication
2.1. Go to Application servers > "ClusterMember1" > Web container > Session management > Distributed environment settings
2.2 Click Memory-to-memory replication
2.3 Select your newly created replication domain and "Both client and server" as replication mode
2.4 Click OK
2.5 Save & synchronize changes

Repeat this steps (2.1 -> 2.5) for every Cluster Member.

3. Restart all Cluster Members