[Seaside] Session. Where to put DB connect/disconnect code.
tblanchard at mac.com
Wed Mar 2 16:29:57 CET 2005
On Mar 2, 2005, at 4:40 AM, Dmitry Dorofeev wrote:
> Hi all,
> I finally managed to connect to Postgres from Squeak and now shaping
> my code to be nice :-)
> I red http://www.techgame.net/projects/Seaside/wiki/UsingGOODS and
> found it useful,
> So now i have lazy initialization of my PostgreSQL connection as
> article suggested
> and have one connection to DB per Session so i can easily have complex
> which are hardly possible unless you use Seaside.
> The question is where to put PostgreSQL disconnect code ?
> I tried to overwrite Session>>expire but it never called (Yes i waited
> 600 seconds to check it).
> Example in the doc says
> withEscapeContinuation: aBlock
> ^ (self db) commitWithRetry: [super withEscapeContinuation: aBlock]
> But it is unclear for me what it is and when it get called.
> Thank you !
> Dmitry Dorofeev ** dima at yasp.com **
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
More information about the Seaside