• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • Sessions
  • nadeem
  • Reporter: eellis00
  • December 24, 2008
  • 0
  • Watchers: 1
  • February 02, 2009
  • January 06, 2009

Description

This is related to clustering Tomcat instances with multiple apps using HttpSessionListener to handle sessionDestroyed().

Scenario:

  • server.xml defines at least two root virtual hosts for apps “a” and app “b”
  • both app a and b define a HttpSessionListener in their web.xml
  • have sessionDestroyed() print “a” for a and “b” for b

Note that upon session expiration (assuming 1 session was created for each host) you will see:

“a” “a”

This implies that only the first HttpSessionListener is being loaded and subsequently called by each app when sessions expire.

This bug is putting me in a very difficult position seeing as that my apps depend on sessionDestroyed() to cleanup user cached objects (not to be clustered).

Comments

Tim Eck 2008-12-30

this should be resolved in trunk and 2.7 branch. The session manager (and thus roots) are now scoped with the virtual host name as well as the context path

Fiona OShea 2009-01-05

Assigning to you have the glory of closing

nadeem ghani 2009-01-27

Tested with two apps, each using a HttpSessionListener deployed in separate elements in tomcat/server.xml

Output of both HttpSessionListerners is in log when server is shutdown.