Issue Details (XML | Word | Printable)

Key: GLASSFISH-16136
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Shing Wai Chan
Reporter: spg82
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

For WARs in EARs web sessions are not retained after redeploy

Created: 03/Mar/11 03:12 AM   Updated: 07/Apr/11 03:37 PM   Resolved: 07/Mar/11 10:57 AM
Component/s: web_container
Affects Version/s: 3.1
Fix Version/s: 3.1.1_b01

Time Tracking:
Not Specified

File Attachments: 1. File TestEAR.ear (1 kB) 03/Mar/11 03:12 AM - spg82
2. File TestWeb.war (2 kB) 03/Mar/11 03:12 AM - spg82

Environment:

Windows XP


Tags: sessions web_sessions http_sessions keep_state
Participants: Shing Wai Chan and spg82


 Description  « Hide

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.



Shing Wai Chan added a comment - 07/Mar/11 10:57 AM

Sending web-glue/src/main/java/com/sun/enterprise/web/WebApplication.java
Transmitting file data .
Committed revision 45422.