Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.7.0, 9.0.0-M4
-
None
Description
While moving from a single server setup to a distributed environment with session management provided by Spring Session, I discovered that the current implementation of PageAccessSynchronizer does not work in that scenario:
It assumes that all requests of a session work on an identical session object, where it keeps all current locks. This isn't the case for Spring managed sessions.
See my original post to the users mailing list:
Implementing a custom access synchronizer that stores locks in a static variable or in the application solves these issues. But providing a custom implementation is very cumbersome at the moment. Users have to override all concrete methods in the base class and completely duplicate the PageLock class because waitForRelease and markReleased have package visibility.
I suggest to make these two methods in PageLock public so the class can be reused and extract all the locking logic into an ILockManager with 3 methods: lockPage, unlockPage, and unlockAllPages. The default lock manager could hold the session-scoped locks collection and custom implementations could provide their own locking mechanism.
These changes should be quite straight forward. I can provide a PR if necessary.
Since the changes required are not entirely backwards compatible, I guess that the PR target would be Wicket 9.
Attachments
Attachments
Issue Links
- links to