[ https://issues.apache.org/jira/browse/WICKET-6702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196141#comment-17196141 ]
Emond Papegaaij commented on WICKET-6702: ----------------------------------------- [~tobiashaupt] I agree with you that it might be a good idea to find a way to flush the request earlier, finishing the response while still holding the lock to cleanup of the request. I think we should file a new ticket for that (if it does not yet exist). The current behavior is broken. You cannot serialize a page without holding a lock. You might get the correct result, you might get an exception (either during serialization or in the concurrent request) or one of the two might produce incorrect results (like serializing non-detached models including their state). In fact, I don't believe this feature has ever worked the way it was supposed to. > AsynchronousPageStore with NotDetachedModelChecker - "Not detached model > found" exception on several fast sequential Ajax calls > ------------------------------------------------------------------------------------------------------------------------------- > > Key: WICKET-6702 > URL: https://issues.apache.org/jira/browse/WICKET-6702 > Project: Wicket > Issue Type: Bug > Components: wicket-core > Affects Versions: 8.5.0, 9.0.0 > Reporter: Sergei Tkachuk > Priority: Major > Attachments: QuickStart.zip > > > Preconditions: Application uses AsynchronousPageStore (as it is by default). > When there are several fast sequential Ajax calls to a component, then a > component's LoadableDetachableModel gets attached and detached several times > before real async serialization takes place. And at times the serialization > is initiated when the model has been already attached once again by a > subsequent Ajax call, and not detached yet as the request is still in > progress. This causes NotDetachedModelChecker() to throw "Not detached model > found!" exception > Disabling async serialization fixes the problem. > A test-case and a log attached. -- This message was sent by Atlassian Jira (v8.3.4#803005)