You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "bernard (JIRA)" <ji...@apache.org> on 2009/02/21 10:34:01 UTC

[jira] Created: (WICKET-2116) Session instantiated twice

Session instantiated twice
--------------------------

                 Key: WICKET-2116
                 URL: https://issues.apache.org/jira/browse/WICKET-2116
             Project: Wicket
          Issue Type: Bug
          Components: wicket-auth-roles
    Affects Versions: 1.4-RC1
         Environment: Windows, JDK 1.6
            Reporter: bernard


The attached testcase is similar to the Authentication example in the distribution, only simpler.
If I set a breakpoint on the constructor of the TestSession class, then the session is instantiated twice. Once when HomePage is loaded, and the second time when the link to the Admin page is clicked. If in contrast I run the Authentication example then its session is instantiated only once.

I don't have any idea why this happens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2116) Session instantiated twice

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2116.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

wicket does not store the session instance into http session until there is a reason to: either you render a stateful page or you call session.bind() manually. since your home is stateless the testsession instance is not persisted into http session.

> Session instantiated twice
> --------------------------
>
>                 Key: WICKET-2116
>                 URL: https://issues.apache.org/jira/browse/WICKET-2116
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.4-RC1
>         Environment: Windows, JDK 1.6
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: Testcase.zip
>
>
> The attached testcase is similar to the Authentication example in the distribution, only simpler.
> If I set a breakpoint on the constructor of the TestSession class, then the session is instantiated twice. Once when HomePage is loaded, and the second time when the link to the Admin page is clicked. If in contrast I run the Authentication example then its session is instantiated only once.
> I don't have any idea why this happens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2116) Session instantiated twice

Posted by "bernard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bernard updated WICKET-2116:
----------------------------

    Attachment: Testcase.zip

Testcase - just the source files and the web.xml

> Session instantiated twice
> --------------------------
>
>                 Key: WICKET-2116
>                 URL: https://issues.apache.org/jira/browse/WICKET-2116
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.4-RC1
>         Environment: Windows, JDK 1.6
>            Reporter: bernard
>         Attachments: Testcase.zip
>
>
> The attached testcase is similar to the Authentication example in the distribution, only simpler.
> If I set a breakpoint on the constructor of the TestSession class, then the session is instantiated twice. Once when HomePage is loaded, and the second time when the link to the Admin page is clicked. If in contrast I run the Authentication example then its session is instantiated only once.
> I don't have any idea why this happens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2116) Session instantiated twice

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675681#action_12675681 ] 

Juergen Donnerstag commented on WICKET-2116:
--------------------------------------------

Because in your example Wicket has no reason to keep the first session; there is no data, nothing has changed. Not persisting the session and creating a new one with the next request doesn't make a difference, but is the cheaper operation.

> Session instantiated twice
> --------------------------
>
>                 Key: WICKET-2116
>                 URL: https://issues.apache.org/jira/browse/WICKET-2116
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.4-RC1
>         Environment: Windows, JDK 1.6
>            Reporter: bernard
>         Attachments: Testcase.zip
>
>
> The attached testcase is similar to the Authentication example in the distribution, only simpler.
> If I set a breakpoint on the constructor of the TestSession class, then the session is instantiated twice. Once when HomePage is loaded, and the second time when the link to the Admin page is clicked. If in contrast I run the Authentication example then its session is instantiated only once.
> I don't have any idea why this happens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.