[ https://issues.apache.org/jira/browse/WICKET-6452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153538#comment-16153538 ]
KAHA commented on WICKET-6452: ------------------------------ Ok, i have made new demo project (in zip file) . I have tested it on version 8.0.0-M6. here is log file where you can see that page 107 was stored, but loading page 107 from store return null and new page is created and rendered again ... Store Page 107 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 108 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 107 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 109 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 109 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 108 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 110 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 110 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 109 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 111 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 111 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 110 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 112 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 112 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 111 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 113 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 113 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 112 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 114 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 114 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 113 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 115 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 115 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 114 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 116 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 116 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 115 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 117 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 117 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 116 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 118 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 118 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 118 on session node01afimri2ixqlb14azexfgs28gg0 Get Page 117 for session node01afimri2ixqlb14azexfgs28gg0 result null Store Page 119 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 119 on session node01afimri2ixqlb14azexfgs28gg0 Store Page 119 on session node01afimri2ixqlb14azexfgs28gg0 It looks that this behavior is better on version 8.0.0-M7. But still on version 8.0.0-M7 I am able to reproduce this error on our project. But our project is much much complicated that this simple example. > Problem while multiple opening same page in WICkET 8.0.0-M6 > ----------------------------------------------------------- > > Key: WICKET-6452 > URL: https://issues.apache.org/jira/browse/WICKET-6452 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 8.0.0-M6 > Environment: Windows 10 64bit CZ Java(TM) SE Runtime Environment > (build 1.8.0_131-b11) > Reporter: KAHA > Attachments: ABRA BI - Google Chrome 15.08.2017 13_33_45.mp4, ABRA BI > - Google Chrome 15.08.2017 13_33_45_x264.mov, test.zip > > > As you can see on the video, there is a problem when I multiple open same > page. Each one page is rendered again and again and again (you can see it on > rapidly increasing page number). There were no problem with same excercise on > Wicket 7. > I think that problem is in method > org.apache.wicket.core.request.handler.PageProvider.getPageInstance(). In > Wicket 7 there was > if (pageInstance == null) > { > resolvePageInstance(pageId, pageClass, pageParameters, renderCount); > if (pageInstance == null) > { > throw new PageExpiredException("Page with id '" + pageId + "' > has expired."); > } > } > return pageInstance; > If pageInstance is null, method resolvePageInstance is called and > resolvePageInstance first trying to load page stored on disk (stored thanks > Serialization) and it will success. If there is no page stored on disk with > this pageID, than getPageSource().newPageInstance( ... is called to create > new page instance. > On other hand on the new wicket 8 same method > org.apache.wicket.core.request.handler.PageProvider.getPageInstance() looks > like this > return getProvision().getPage(); > and In Provision class method getPage looks like this > if (page == null && doesProvideNewPage()) > { > page = getPageSource().newPageInstance(pageClass, > pageParameters); > } > return page; > if the page is null, method does not try to load page stored on the disk, but > imediatly creates a new instance and this is why same page is created many > times repeatly. > But it is only my guess. -- This message was sent by Atlassian JIRA (v6.4.14#64029)