You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jan Sýkora (JIRA)" <ji...@apache.org> on 2009/07/08 10:04:14 UTC
[jira] Created: (WICKET-2359) newSession called too often
newSession called too often
---------------------------
Key: WICKET-2359
URL: https://issues.apache.org/jira/browse/WICKET-2359
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4-RC4
Environment: win, java 1.6, tomcat
Reporter: Jan Sýkora
when no session is found in ISessionStore the application.newSessionI(...) is called many times.
the problem is that the session is stored to the session store at the end of the first request (detach) but the findOrCreate might be called many times.
as the session is stored to thread local in Session.java:237 I guess that is should be also checked (in not null) and used before Session.java:223
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2359) newSession called too often
Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728565#action_12728565 ]
Johan Compagner commented on WICKET-2359:
-----------------------------------------
I dont see this.
findOrCreate is only called in 2 places. 1 that makes the RequestCycle (that only happens once in a request)
and 2 when Session.get() is called but thats will test the threadlocal
So it should work fine. I dont know why is calling findOrCreate at your place more, but if that is your code then thats wrong that should be Session.get()
> newSession called too often
> ---------------------------
>
> Key: WICKET-2359
> URL: https://issues.apache.org/jira/browse/WICKET-2359
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC4
> Environment: win, java 1.6, tomcat
> Reporter: Jan Sýkora
>
> when no session is found in ISessionStore the application.newSessionI(...) is called many times.
> the problem is that the session is stored to the session store at the end of the first request (detach) but the findOrCreate might be called many times.
> as the session is stored to thread local in Session.java:237 I guess that is should be also checked (in not null) and used before Session.java:223
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-2359) newSession called too often
Posted by "Jan Sýkora (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Sýkora closed WICKET-2359.
------------------------------
Resolution: Invalid
sorry, I've found out, that I was calling Session.get() somewhere down in new MySession()
this of course triggered new call to the newSession as the 'previous' one hasn't been stored in the thread local yet.
> newSession called too often
> ---------------------------
>
> Key: WICKET-2359
> URL: https://issues.apache.org/jira/browse/WICKET-2359
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC4
> Environment: win, java 1.6, tomcat
> Reporter: Jan Sýkora
>
> when no session is found in ISessionStore the application.newSessionI(...) is called many times.
> the problem is that the session is stored to the session store at the end of the first request (detach) but the findOrCreate might be called many times.
> as the session is stored to thread local in Session.java:237 I guess that is should be also checked (in not null) and used before Session.java:223
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.