[Seaside] Session. Where to put DB connect/disconnect code.
Dmitry Dorofeev
dima-sender-3c337a at yasp.com
Thu Mar 3 10:19:46 CET 2005
Hi all,
still no luck even with Session>>unregistered
should i try finalize ?
Todd Blanchard wrote:
> try Session>>unregistered
>
>
> 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
>> commits/rollbacks
>> 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
>> http://lists.squeakfoundation.org/listinfo/seaside
>>
>
--
Dmitry Dorofeev ** dima at yasp.com **
More information about the Seaside
mailing list