You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/09/21 20:26:20 UTC

DO NOT REPLY [Bug 3770] New: - HttpSessionListener.sessionCreated() called twice for each session

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3770>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3770

HttpSessionListener.sessionCreated() called twice for each session

           Summary: HttpSessionListener.sessionCreated() called twice for
                    each session
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: hans@gefionsoftware.com


The sessionCreated() method is called twice for each new session.

Test code:

public class MyListener implements HttpSessionListener {
    public void sessionCreated(HttpSessionEvent hse) {
	HttpSession session = hse.getSession();
	System.out.println("Created called: " + session.getId());
	System.out.println("isNew(): " + session.isNew());
    }
}

Result:
  Created called: F054C065430771A554A54117C113D446
  isNew(): true
  Created called: F054C065430771A554A54117C113D446
  isNew(): true