[Seaside] Session accesible from the model of an application

Göran Krampe goran at krampe.se
Wed Apr 18 11:06:23 UTC 2007


> 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

More information about the Seaside mailing list