So we (thinking of Sling amongst other things) might have to adapt
our event listeners to do a Session.refresh at the beginning of the
onEvent method (in case long lived sessions are used).

For obvious reasons a snapshot-based implementation would need to
implicitly call refresh(true) on a session before delivering
observation events.

IIUC you want to "auto-refresh" all sessions each time observation events are being delivered?

Why do we 'obviously' need this? I understand, there will be a change from the current behaviour: while today sessions can't see items anymore which they get DELETE events for, in the new implementation sessions can't see items yet which they get ADD events for. From that perspective the new behaviour seems more flexible and complete: sessions can see deleted items until they do a refresh. Afterwards they can see the added items.

Michael


Sure. I think the main problem with long lived sessions I know of
(in Sling based applications) is with Observation Listeners which
are quite isolated and can be "fixed" easily -- there just has to
be awareness.

The above approach should limit the impact on observation listeners.

Also, to help prevent issues with other kinds of long-lived sessions,
it might be a good idea to have a configurable auto-refresh policy.

BR,

Jukka Zitting

Reply via email to