[
http://jira.jboss.com/jira/browse/JBSEAM-2888?page=comments#action_12411818 ]
Dan Allen commented on JBSEAM-2888:
-----------------------------------
Sounds good to me. I'm just glad that we could track this down to a concrete problem.
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.0.2.CR1, 2.1.0.A1, 2.0.1.GA
Reporter: Dan Allen
Assigned To: Norman Richards
Priority: Minor
Fix For: 2.1.0.BETA1
Original Estimate: 2 days
Remaining Estimate: 2 days
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