[Seaside] Session accesible from the model of an application

John Thornborrow john at pinesoft.co.uk
Wed Apr 18 11:09:32 UTC 2007


Göran Krampe wrote:
> Hi!
>
>   
>> Try implementing a Registry (see "Registry Pattern") and if you are
>> using magma in single-user mode, implement a singleton on the magma
>> session. I opted to subclass MagmaSession and provide an #instance method:
>>
>> instance
>>     ^Session ifNil:
>>          [Session _ (MagmaSession openLocal: '/path') connectAs: 'user']
>>     
>
> Ehmmm... the problem here (I presume) is that there are multiple
> MagmaSessions being used in different Processes. So you need to get hold
> of the *correct* MagmaSession - not just a singleton.
>
> regards, Göran
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>  
>
>   
Hence the "if you are using single user mode" :) The singleton is merely
for that. Use a Registry to contain the sessions, then pass that around
your model/application.


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



More information about the Seaside mailing list