[Glass] [GS/SS Beta] Set session duration

Mariano Martinez Peck marianopeck at gmail.com
Tue Mar 11 12:53:50 PDT 2014


Hi guys,

I am reviving this old thread because I have been caught by the same
problem. In my case, I wanted to expire at the same time I have defined for
the app (moreover, same session class could be used in different apps with
different expiration times). Also, I wanted to use the same session class
for Pharo and for GemStone. So what I did was to implement:

MyWASessionSubclass >> setParent: aRequestHandler
super setParent: aRequestHandler.
continuations expiryPolicy configuration attributeAt: #cacheTimeout
ifAbsent: [ ^ self ].
continuations expiryPolicy configuration attributeAt: #cacheTimeout put:
(aRequestHandler cache expiryPolicy configuration at: #cacheTimeout).


I couldn't use the #initialize because at that point my app was not yet
set..and I wanted to grab the timeout from there.  The ugly IF is just so
that it works in Pharo as well....

Now...the question is...what is this timeout of continuations? How does it
impacts me as a developer? it is correct to set the same time as the app?
>From my tests it does seem the case, but I just wonder....

Thanks in advance,




On Mon, Apr 23, 2012 at 9:19 AM, keropotter <keropotter at gmail.com> wrote:

> Yes, that's what Dale suggested and it worked perfectly.
>
> Thank you!!
> Ale
>
> On Sun, Apr 22, 2012 at 10:58 AM, Philippe Marschall [via Smalltalk] <[hidden
> email] <http://user/SendEmail.jtp?type=node&node=4580243&i=0>> wrote:
>
>> On Fri, Apr 13, 2012 at 2:23 AM, Dale Henrichs <[hidden email]<http://user/SendEmail.jtp?type=node&node=4578211&i=0>>
>> wrote:
>> > It doesn't look like there is any way to actually control the timeout
>> used by the continuation cache without directly editing the code. The
>> WASession>>createCache method looks like the following:
>> >
>>
>> Subclassing WASession and overriding #createCache should work.
>>
>> Cheers
>> Philippe
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>> http://forum.world.st/Set-session-duration-tp4553027p4578211.html
>>  To unsubscribe from Set session duration, click here.
>> NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: Set session duration<http://forum.world.st/Set-session-duration-tp4553027p4580243.html>
>
> Sent from the GLASS mailing list archive<http://forum.world.st/GLASS-f1460844.html>at Nabble.com.
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140311/099f2e7c/attachment.html>


More information about the Glass mailing list