Running thread + AJAX + page serialization

2012-04-12 Thread Martin Schayna
Hi, I have this scenario: - browser requests some time-expensive page - page renders lazy component (instead of regular component) and starts thread for computation data - lazy component use Behavior with AJAX callback, timed in seconds - user sees in browser indicator - when Behavior fires,

Re: Running thread + AJAX + page serialization

2012-04-12 Thread Dan Retzlaff
Hi, Martin. I don't think it's appropriate to have your background thread referencing page objects, especially not modifying them. In general, pages get deserialized from the page store, in which case the thread's changes won't even be seen. Maybe you are saved by an optimization that leaves the

Re: Running thread + AJAX + page serialization

2012-04-12 Thread Martin Grigorov
Hi, You can avoid this problem by using copy-on-write collections but this will just postpone seeing the bigger problem: showing stale data. Here is the scenario: - wicket serializes the page in the disk - your thread pushes data which is stored somehow in the page - a new ajax request comes and