If an EAR application, containing a WAR module is deployed and then the same EAR is redeployed the web sessions are lost although the option "Keep state" was checked in admin GUI before redeployment.
I am attaching a simple WAR and EAR to demonstrate the issue. The EAR is nothing more but a container for the same WAR.
Steps to reproduce.
1. Deploy TestEAR.ear
2. Open the TestWeb index page in a web browser ( http://localhost:8080/TestWeb/ ). You will see a webpage with a simple "Counter: 0"
3. Refresh the page a couple of times. You will see the counter increasing.
4. Redeploy the application from GUI with "Keep state" on. (I also tested with asadmin keepSessions=true with the same result)
5. Refresh the page in the browser again. You will see that the counter is reset to 0.
If you go through the above steps with the WAR file ( TestWeb.war ) instead of the EAR you should see that the counter is not reset in step 5. The problem I describe is for version 3.1, it does not seem to occur for v3-final even with the EAR redeployment.