Bug #833

Persistent sessions

Added by Robert Weekly about 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


WSS appears to no longer terminate sessions upon query completion. The Tomcat manager can detect Session IDs (attached) for processes that have long been finished, but continue to idly persist - this behavior is fundamentally different from pre-2.0 versions of WSS. Without WSS handling the termination of sessions/processes, it is left to the Tomcat container to kill the session, which occurs after 30 minutes of inactivity.

Screen Shot 2016-07-28 at 4.16.57 PM (2).png (505 KB) Screen Shot 2016-07-28 at 4.16.57 PM (2).png open sessions on wslive2:8082 Robert Weekly, 07/28/2016 04:20 PM
Screen Shot 2016-07-28 at 4.23.55 PM (2).png (821 KB) Screen Shot 2016-07-28 at 4.23.55 PM (2).png list of session IDs Robert Weekly, 07/28/2016 04:24 PM


#1 Updated by Robert Weekly about 6 years ago

  • Assignee set to Mike Stults

#2 Updated by Chad Trabant about 6 years ago

The web.xml in WSS 2.x of a deployed application (WEB-INF/web.xml) contains this bit:


which is not included in the WSS 1.x deployments.

#3 Updated by Yazan Suleiman about 6 years ago

I believe part of the problem is in RequestInfo line 120:

String contextPath = req.getSession().getServletContext().getContextPath();

This should be:

String contextPath = req.getServletContext().getContextPath();

getSession() will create a session no matter what config parameters are set

#4 Updated by Mike Stults about 6 years ago

  • Resolution set to Fixed
  • Target version set to 2.2.2

A code change is made in WSS 2.2.2 as Yazan recommends, the code is changed to

String contextPath = req.getContextPath();

This prevents the creation of a session per request, WSS does not use sessions as there is not state maintained for clients, so there is no need to create a session.

#5 Updated by Robert Weekly about 6 years ago

Confirmed fixed; closing ticket.

#6 Updated by Robert Weekly almost 6 years ago

  • Status changed from New to Closed

Also available in: Atom PDF