[Seaside] GOODS connection question

Marco Paga seaside at marco-paga.de
Tue Jun 15 17:25:55 CEST 2004


Am Montag, 14. Juni 2004 20:48 schrieb Jason Dufair:
> In my "allowance" app, I naively have a Piggybank class>>database method
> where Piggybank is my model class.  It does the following:
>
> database
>
> 	^(Database isNil or: [Database isConnected not])
> 		ifTrue: [Database := KKDatabase onHost: self dbHostName port: self
> dbPort] ifFalse: [Database]

I have the same thing for the user auth, but I use it just in short term and 
refresh the db connection every time.

>
> All model objects call the class side save method when they change:
>
> save
>
> 	self database commit
>
> After some time, I get walkbacks with proxy objects being unable to
> connect to the GOODS database.  Avi, I remember you talking about tying
> the Seaside session to the GOODS session perhaps.  Is this what I should
> do?  How are other people maintaining connections to their GOODS
> databases?

I put a connection in my session. Perhaps it is some overhead, but you need to 
verify that just the db session that created the proxy objects works on them. 
I think it's a feature because every client can have it's own tree of objects 
to navigate on ,edit and commit.

regards
marco



More information about the Seaside mailing list