Re: Application level state

Bernhard Pieber <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
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:

registerApps
	| app1 app 2 |
	app1 := WAAdmin registerAsApplication: BpRootComponent at: ‚/app1'.
	app1 applicationModel: BpApplicationModel new.
	app2 := WAAdmin registerAsApplication: BpRootComponent at: ‚/app2'.
	app2 applicationModel: BpApplicationModel new.

Cheers,
Bernhard

> Am 20.07.2017 um 20:45 schrieb Esteban A. Maringolo <[email protected]>:
> 
> 2017-07-20 15:41 GMT-03:00 Bernhard Pieber <[email protected]>:
>> 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
> [email protected]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.