You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2005/04/14 09:44:49 UTC
Re: logged-in identities [WAS: Re: [1.4] Pessimistic offline lock
and check-out]
Michael Wechner wrote:
> Andreas Hartmann wrote:
>
>> Michael Wechner wrote:
>>
>> [...]
>>
>>>> Maybe it would even be possible to store the session ID in the checkout
>>>> entry? This would allow to check if the corresponding session is
>>>> still alive.
>>>
>>>
>>>
>>>
>>>
>>> I think this is another issue and it would certainly be great to see
>>> for an administrator to actually see who is logged in, etc.
>>> Unfortunately IIRC the servlet API was changed (I think for security
>>> reasons) and AFAIK it's not so easy anymore to get all the sessions
>>> and their "parameters" to show who is actually logged into Lenya.
>>
>>
>>
>> Maybe we could introduce a registry with a WeakHashMap holding
>> references to the logged-in identities?
>
>
>
> that should work, but we also would need to find a way to recognize when
> a session becomes invalid (logout could also be registered of course).
If we use a WeakHashMap, that shouldn't be necessary. If the map holds
the only reference to the object, the reference is automatically removed
from the map. I.e. when the session expires, the identity is removed
from the map.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: logged-in identities [WAS: Re: [1.4] Pessimistic offline lock
and check-out]
Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:
>>>
>>>
>>> Maybe we could introduce a registry with a WeakHashMap holding
>>> references to the logged-in identities?
>>
>>
>>
>>
>> that should work, but we also would need to find a way to recognize when
>> a session becomes invalid (logout could also be registered of course).
>
>
> If we use a WeakHashMap, that shouldn't be necessary. If the map holds
> the only reference to the object, the reference is automatically removed
> from the map. I.e. when the session expires, the identity is removed
> from the map.
cool, didn't know that WeakHashMap does that automagically.
Michi
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org