I created the patch[1] to make this issue reproduces notably. This patch sleeps for 10 seconds, before set the false to the isNew.
1. Start EAP 5.1.2 server and deploy TestApp.war.
2. Execute following URL in your a web browser.
http://localhost:8080/TestApp/TestServlet
3. You can confirm isNew=true in following output.
09:50:13,765 INFO [STDOUT] – doPost : start
09:50:13,766 INFO [STDOUT] ---- isNew : true
09:50:13,766 INFO [STDOUT] – doPost : end
4. Execute same URL in your a browser.
5. You can confirm isNew=false in following output.
09:52:24,624 INFO [STDOUT] – doPost : start
09:52:24,624 INFO [STDOUT] ---- isNew : false
09:52:24,624 INFO [STDOUT] – doPost : end
6. Stop EAP server.
7. Put the test_patch.jar on JBOSS_HOME/<servername>/lib.
8. Start EAP server.
9. Execute following URL in your a browser.
http://localhost:8080/TestApp/TestServlet
10. You can confirm isNew=true in following output.
10:08:57,031 INFO [STDOUT] – doPost : start
10:08:57,031 INFO [STDOUT] ---- isNew : true
10:08:57,031 INFO [STDOUT] – doPost : end
10:08:57,032 INFO [STDOUT] ** endAccess start
11. Execute same URL in your a browser.
12. You can confirm even if the session is already created, isNew=true in following output.
10:08:57,035 INFO [STDOUT] – doPost : start
10:08:57,035 INFO [STDOUT] ---- isNew : true
10:08:57,035 INFO [STDOUT] ------ id : 9E8B500B37541D6627C69B37761D54ED
10:08:57,036 INFO [STDOUT] ------ getId() : 9E8B500B37541D6627C69B37761D54ED
10:08:57,036 INFO [STDOUT] – doPost : end
10:08:57,036 INFO [STDOUT] ** endAccess start
10:09:07,032 INFO [STDOUT] ** endAccess end
10:09:07,037 INFO [STDOUT] ** endAccess end
Note.
This issue may be unable to be confirmed when keep-alive of a browser is the true.
Please set the false to keep-alive of a browser or confirm this issue by JMete.
I uploaded TestPlan01.jmx for testing by JMete to this JIRA.
[1] test_patch.jar
org.apache.catalina.session.StandardSession.java
public void endAccess() {
+ System.out.println("** endAccess start");
+ try
{
+ Thread.sleep(10000L);
+ }
catch (InterruptedException e)
{
+ e.printStackTrace();
+ }
isNew = false;
+ System.out.println("** endAccess end");
if (ACTIVITY_CHECK)
{
accessCount.decrementAndGet();
}
}