[Seaside] Re: Glorp Sessions in ajax requests

John McKeon p3anoman at gmail.com
Fri Sep 10 18:45:04 UTC 2010


Have a look at the Seaside-Glorp package. It should be in the public
repository (and comes prepackaged with WebVelocity) provides for Seaside
session-glorp session "persistence", accessor pooling, etc. The package
comments say it is based on work by Ramon Leon so you might check his blog
to see if you can glean some hints
there<http://onsmalltalk.com/making-a-connection-pool-for-glorp-in-seaside>
John
On Fri, Sep 10, 2010 at 2:27 PM, Bart Veenstra <bart.veenstra at gmail.com>wrote:

> And another thing is bugging me during the development.
>
> How do I cope with glorp objects that are stored in a WAComponent, like the
> current user, and use that when I update other glorp objects. It keeps
> pushing me a DuplicatePrimaryKeyException because the object is not in the
> current session. I need to reinstantiate the current user in the session
> with a database lookup, before I can use it again...
>
> So, How to properly mix glorp objects coming from different sessions? This
> could be resolved, if the glorpFilter stays put in the WASession in each
> ajax request.
>
> Should I drop the glorp filter and put the glorp session in the WASession
> properties instance variable?
>
> Regards,
>
> Bart
>
>
>
> 2010/9/10 Bart Veenstra <bart.veenstra at gmail.com>
>
>> Hi,
>>
>> I am working on an Ajax heavy application with Glorp as my mapping
>> framework. I use the Glorp filter to assign a glorpSession to my database
>> objects. This works pretty well, but it seems that for each request within
>> the same session (like an jQuery ajax callback) a new GlorpSession is
>> created.
>>
>> When removing all sessions using WAAdmin clearAll, the Glorp Sessions
>> still remain in the memory, (Checked with GlorpSession allInstances).
>>
>> Should I worry about this? And how do I get rid of the GlorpSessions?
>>
>> I tried GlorpSession allInstances do: [:each | each become:nil ] but the
>> object is immutable...
>>
>> Using VW 77 with the latest seaside from the public repository.
>>
>> Regards,
>>
>> Bart Veenstra
>>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


-- 
http://john-mckeon.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100910/d94e72c3/attachment.htm


More information about the seaside mailing list