[ 
https://issues.apache.org/jira/browse/WICKET-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104293#comment-13104293
 ] 

Emond Papegaaij commented on WICKET-4046:
-----------------------------------------

The proposed patch is intended to included as a whole. One part will not work 
without the other. The problem with the current behaviour is that since 
WICKET-4021, the page provider retrieves a page from the page store in 
isNewPageInstance. This instance is then touched by the AbstractPageManager, 
however the PageProvider does not keep hold of it. Next, in getPageInstance, a 
new instance of the same page is fetched from the page store. This instance is 
not touched, because another instance of the same page is already touched. This 
second instance is used in the request, but at the end of the request, the 
first instance is stored in the page map.

As you can see, the proposed patch is an improvement to PageProvider (removing 
responsibility from that class that shouldn't have been there), a performance 
optimisation (do not fetch the same page from the page store multiple times) 
and a bug fix (the page used in the request is now stored in the page store, 
rather than a stale instance).

> Multiple instances of same page in request and wrong one touched
> ----------------------------------------------------------------
>
>                 Key: WICKET-4046
>                 URL: https://issues.apache.org/jira/browse/WICKET-4046
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.1
>            Reporter: Emond Papegaaij
>         Attachments: pageprovider-notouch.diff
>
>
> The patch for WICKET-4021 can cause an unused instance of a page to be 
> touched. This page is then stored by the page store, rather than the page 
> used in the request. The attached patch cleans up PageProvider, by removing 
> the touch call and makes the RequestAdapter search for a touched page first 
> and only then load it from the page store.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to