I applaud your curiousity: models are for components, they are single threaded (as are components) and thus have nothing to do within a Session.
Thank you for your applauding by the way...
I understood that this model is being shared between different threads and so on so forth. My point was that if LDM is in "read only mode" - would it harm the current use case? I mean a use case when LDM model reads some immutable info.
And again the overall issue - I can see that WicketObjects#sizeof(final Serializable object), which is used for defining Wicket session size, is actually expecting that there might be objects which are implementing IDetachable
else if (object instanceof IDetachable)
IDetachable clone = (IDetachable) cloneObject(object);
target = clone;
in parallel with NotDetachedModelChecker, which does the check on this session serialization stack:
public Result doCheck(Object obj)
Result result = Result.SUCCESS;
if (obj instanceof LoadableDetachableModel<?>)
LoadableDetachableModel<?> model = (LoadableDetachableModel<?>) obj;
result = new Result(Result.Status.FAILURE, "Not detached model found!");
verifies this non-detached state and issues a failure, which is a little bit misleading... because even if there are some issues with concurrency, bad design, whatever... with this error message in the log, it says that there is not-detached model in the session, which is not true actually.
If you think that this is not valid use-case and Mr. Martin Grigorov doesn't have additional reasons to fix the "issue" - I give up here.
Thank you for your responses...