[Seaside] Application level state
bernhard at pieber.com
Thu Jul 20 18:57:16 UTC 2017
I forgot to explicitly describe one key requirement: each application should be able to have multiple sessions.
I thought about request filters. However, as they are on session level, I don’t know which application to assign when the session is created. The only time I can think of assigning the application is during registering. Something like:
| app1 app 2 |
app1 := WAAdmin registerAsApplication: BpRootComponent at: ‚/app1'.
app1 applicationModel: BpApplicationModel new.
app2 := WAAdmin registerAsApplication: BpRootComponent at: ‚/app2'.
app2 applicationModel: BpApplicationModel new.
> Am 20.07.2017 um 20:45 schrieb Esteban A. Maringolo <emaringolo at gmail.com>:
> 2017-07-20 15:41 GMT-03:00 Bernhard Pieber <bernhard at pieber.com>:
>> Hi Esteban,
>> Thank you for your answer.
>> What I would like to achieve is to have two independent instances (completely independent data) of the same application (code) in the same image, accessible through different context paths. The applications share all the code but should not share any data, e.g. each instance would have their own users etc.
>> To make my own global registry is a definitely a way to achieve this. However, I wondered if there might be a better way using Seaside facilities.
> Then you should use a regular Seaside Session for that and have your
> own "application" class whose instances will be referenced by each
> separate session in a 1:1 relationship (each session will have it's
> own application instance).
> You could achieve something similar using WARequestFilters, but I find
> it convoluted when you can simply create your own WASession subclass.
> Esteban A. Maringolo
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside