unregistered not called on expired session?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
bpi
Reply | Threaded
Open this post in threaded view
|

unregistered not called on expired session?

bpi
Hi all,

I have registered my own session class and I want to run some code when the session expires. I overwrote unregistered, writing to the Transcript and calling super unregistered.

When I click on New Session in the toolbar I see it in the transcript. However, when the session expires because there is no activity nothing is written to the transcript.

I set both Maximum Absolute Age and Maximum Relative Age to 10 seconds in the config application. I know the sessions are expired because they are no longer returned when calling WAApplication>>#sessions.

Is this a bug, or do I misunderstand something?

I am using Seaside 3.2.2 on Pharo 6.

Bernhard
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: unregistered not called on expired session?

David Tibbe-2
Hi Bernhard,

remember, #unregistered is not getting called when the expiry occurs.
There is no background thread checking all session if they are expired.

Instead, when creating a new session, the current cache is getting
checked for old entries and if found, they're getting removed and by
that, the #unregistered is getting called.

Just put a breakpoint in it, wait for the expiry and create a new
session, then the debugger should pop up and you can follow the call flow.

BR,
  David

Am 10.03.2018 um 17:40 schrieb Bernhard Pieber:

> Hi all,
>
> I have registered my own session class and I want to run some code when the session expires. I overwrote unregistered, writing to the Transcript and calling super unregistered.
>
> When I click on New Session in the toolbar I see it in the transcript. However, when the session expires because there is no activity nothing is written to the transcript.
>
> I set both Maximum Absolute Age and Maximum Relative Age to 10 seconds in the config application. I know the sessions are expired because they are no longer returned when calling WAApplication>>#sessions.
>
> Is this a bug, or do I misunderstand something?
>
> I am using Seaside 3.2.2 on Pharo 6.
>
> Bernhard
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Twitter Bootstrap examples working on Seaside 3.1 squeak?

tty
Thought I would ask before I troubleshoot things.


Thx





---- On Sun, 11 Mar 2018 10:14:46 -0400 [hidden email] wrote ----
Hi Bernhard,

remember, #unregistered is not getting called when the expiry occurs.
There is no background thread checking all session if they are expired.

Instead, when creating a new session, the current cache is getting
checked for old entries and if found, they're getting removed and by
that, the #unregistered is getting called.

Just put a breakpoint in it, wait for the expiry and create a new
session, then the debugger should pop up and you can follow the call flow.

BR,
David

Am 10.03.2018 um 17:40 schrieb Bernhard Pieber:

> Hi all,
>
> I have registered my own session class and I want to run some code when the session expires. I overwrote unregistered, writing to the Transcript and calling super unregistered.
>
> When I click on New Session in the toolbar I see it in the transcript. However, when the session expires because there is no activity nothing is written to the transcript.
>
> I set both Maximum Absolute Age and Maximum Relative Age to 10 seconds in the config application. I know the sessions are expired because they are no longer returned when calling WAApplication>>#sessions.
>
> Is this a bug, or do I misunderstand something?
>
> I am using Seaside 3.2.2 on Pharo 6.
>
> Bernhard
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
bpi
Reply | Threaded
Open this post in threaded view
|

Re: unregistered not called on expired session?

bpi
In reply to this post by David Tibbe-2
Hi David,

Thank you for your answer. I understand better now how it was designed.

Bernhard

> Am 11.03.2018 um 15:14 schrieb David Tibbe <[hidden email]>:
>
> Hi Bernhard,
>
> remember, #unregistered is not getting called when the expiry occurs.
> There is no background thread checking all session if they are expired.
>
> Instead, when creating a new session, the current cache is getting
> checked for old entries and if found, they're getting removed and by
> that, the #unregistered is getting called.
>
> Just put a breakpoint in it, wait for the expiry and create a new
> session, then the debugger should pop up and you can follow the call flow.
>
> BR,
>  David
>
> Am 10.03.2018 um 17:40 schrieb Bernhard Pieber:
>> Hi all,
>>
>> I have registered my own session class and I want to run some code when the session expires. I overwrote unregistered, writing to the Transcript and calling super unregistered.
>>
>> When I click on New Session in the toolbar I see it in the transcript. However, when the session expires because there is no activity nothing is written to the transcript.
>>
>> I set both Maximum Absolute Age and Maximum Relative Age to 10 seconds in the config application. I know the sessions are expired because they are no longer returned when calling WAApplication>>#sessions.
>>
>> Is this a bug, or do I misunderstand something?
>>
>> I am using Seaside 3.2.2 on Pharo 6.
>>
>> Bernhard
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Bootstrap examples working on Seaside 3.1 squeak?

tty
In reply to this post by tty
Interesting...

The Examples "Work" but only after the debugger is entered and you hit "proceed".

Error is:


MessageNotUnderstood: TBSBadgeExample class>>methodNamed:

 


Where TBSFoo (in this case TBSBadgeExample) is a subclass of TBSBNootStrapExample

hmm...ok..was able to get rid of the DNS by adding two class methods to TBSBootstrapExample


TBSBootStrapExample>>methodNamed: aString  "just a comment in the empty method"


and


TBSBootStrapExample>>sourceCode ^'foo';

Of course, the source code for each example is "foo" ...which may not work in all cases, but its a start.

I will keep digging.






_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Bootstrap examples working on Seaside 3.1 squeak?

Tobias Pape

> On 14.03.2018, at 00:58, gettimothy <[hidden email]> wrote:
>
> Interesting...
>
> The Examples "Work" but only after the debugger is entered and you hit "proceed".
>
> Error is:
>
>
> MessageNotUnderstood: TBSBadgeExample class>>methodNamed:
>

Looks like a non-portable message to me.

This should work
either
        TBSBootStrapExample class>>methodNamed: aString
                ^ self  compiledMethodAt: aString
or
        TBSBootStrapExample class>>methodNamed: aString
                ^ self  >> aString


>  
>
>
> Where TBSFoo (in this case TBSBadgeExample) is a subclass of TBSBNootStrapExample
>
> hmm...ok..was able to get rid of the DNS by adding two class methods to TBSBootstrapExample
>
>
> TBSBootStrapExample>>methodNamed: aString  "just a comment in the empty method"
>
>
> and
>
>
> TBSBootStrapExample>>sourceCode ^'foo';

Here, make an extension method in CompiledMethod (5.1) or CompiledCode (Trunk)

CompiledMethod>>sourceCode
        ^ self getSource

Best regards
        -Tobias

>
> Of course, the source code for each example is "foo" ...which may not work in all cases, but its a start.
>
> I will keep digging.
>
>
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Bootstrap examples working on Seaside 3.1 squeak?

tty
Thank you. It works!

I chose the 


TBSBootstrapExample class >>methodNamed: aSymbol
        ^ self >> aSymbol


form as it strikes me as elegant. (Also, the message is new to me and it makes sense to use what we have)

Thanks again!


---- On Tue, 13 Mar 2018 20:27:09 -0400 Tobias Pape <[hidden email]> wrote ----

> On 14.03.2018, at 00:58, gettimothy <[hidden email]> wrote:
>
> Interesting...
>
> The Examples "Work" but only after the debugger is entered and you hit "proceed".
>
> Error is:
>
>
> MessageNotUnderstood: TBSBadgeExample class>>methodNamed:
>

Looks like a non-portable message to me.

This should work
either
    TBSBootStrapExample class>>methodNamed: aString
        ^ self compiledMethodAt: aString
or
    TBSBootStrapExample class>>methodNamed: aString
        ^ self >> aString


>
>
>
> Where TBSFoo (in this case TBSBadgeExample) is a subclass of TBSBNootStrapExample
>
> hmm...ok..was able to get rid of the DNS by adding two class methods to TBSBootstrapExample
>
>
> TBSBootStrapExample>>methodNamed: aString "just a comment in the empty method"
>
>
> and
>
>
> TBSBootStrapExample>>sourceCode ^'foo';

Here, make an extension method in CompiledMethod (5.1) or CompiledCode (Trunk)

CompiledMethod>>sourceCode
    ^ self getSource

Best regards
    -Tobias

>
> Of course, the source code for each example is "foo" ...which may not work in all cases, but its a start.
>
> I will keep digging.
>
>
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Bootstrap examples working on Seaside 3.1 squeak?

tty
In reply to this post by Tobias Pape
I submitted an issue to the git repo here:

https://github.com/astares/Seaside-Bootstrap/issues/2


If needed, I will dive into the metacello stuff to provide a fix, but hopefully its an easy tweak for the maintainers.




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside