@quickly closed windows:

if there isn't a started conversation, the window context will be cleaned
up.
anyway, you are free to lower the timeout for window contexts as well as the
session itself.
if you really need a solution based on js, we have to provide it as external
add-on (myfaces extensions projects don't render output).

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/8/7 Gerhard <[email protected]>

> hi mark,
>
> we already cleanup expired and empty window context instances - just use
> the version of the current trunk.
> the only case we currently don't support: an user works with x windows and
> s/he just leaves the app. without a logout.
> in this case the cleanup will happen as soon as the session expires.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/8/7 Mark Struberg <[email protected]>
>
> Hi!
>>
>> One of the main problem with large (huge) web applications is the session
>> footprint.
>>
>> While it is nice to have support for multiple browser tabs or windows, it
>> is
>> otoh pretty memory consuming, because WebApps must maintain their own
>> 'SubSession'. With CODI we provide this for our @WindowScoped,
>> @ViewAccessScoped
>> and @ConversationScoped beans.
>>
>> But even if a page/tab only got opened once and then got closed again very
>> quickly, we currently still store the WindowContext for this page for as
>> long as
>> 60 minutes.
>>
>>
>> So what about adding a small JavaScript which periodically (e.g. all 60
>> seconds)
>> 'ping' some Servlet or anything else with an AJAX request and increments a
>> counter in it's WindowContext? Each normal bean access will reset this
>> counter
>> to 0 within the EditableWindowContext#touch(); If the counter reaches 60,
>> we can
>> easily cleanup the WindowContext.
>>
>> With this little trick we can lower down the standard timeout for
>> WindowContexts
>> to a much lower value, e.g. 3 minutes. If there is any window for that
>> context
>> still open, then we will get the 'ping' which resets the timeout.
>> The only impact I can think of is if you need to leave the current webapp,
>> do
>> some work in another one and come back later. This might be solved by
>> storing
>> some information in a cookie and providing an 'openWindowStore' via
>> memcached or
>> any othe cluster mechanism. Or open the target page in a single big
>> iframe...
>> ideas please ;)
>>
>> wdyt?
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>>
>

Reply via email to