[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2888) Calling Session.invalidate() leads to an explosion of new sessions

Dan Allen (JIRA) jira-events at lists.jboss.org
Mon Apr 14 02:41:54 EDT 2008


Calling Session.invalidate() leads to an explosion of new sessions
------------------------------------------------------------------

                 Key: JBSEAM-2888
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2888
             Project: Seam
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.1.0.A1, 2.0.2.CR1, 2.0.1.GA
            Reporter: Dan Allen


There appears to be a pretty nasty bug in Seam during the post-session invalidation routine. If you call #{session.invalidate} (which is also called by #{identity.logout}) a new session is created each time the conversation is referenced for the duration of the request.

To observe this behavior, install an HttpSessionListener that watches for session creation. Then run one of these two action listener methods. You will observe the many hits to the sessionCreated() method during the request that terminates the session with Session.invalidate().

public class SessionNotifier implements HttpSessionListener {
    public void sessionCreated(HttpSessionEvent e) {
        System.out.println("created session with id: " + e.getSession().getId());
    }

    public void sessionDestroyed(HttpSessionEvent e) {}
}

You can run Thread.dumpStack() in the listener to see that it is happening as a result of attribute reads on the ServerConversationContext. I guess because the session was invalidated, Seam attempts to recreate the session over and over as it works with the conversation within that request.

I consider this a pretty serious bug because it leads to significant growth of the HTTP session.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list