[Seaside] Request start/end (and Glorp)
fusion at storytotell.org
Mon Jan 20 17:57:01 UTC 2014
On Jan 19, 2014, at 12:17 PM, Philippe Marschall <philippe.marschall at gmail.com> wrote:
> On Sun, Jan 19, 2014 at 8:41 AM, Daniel Lyons <fusion at storytotell.org> wrote:
>> 2. "Or more likely, empty the cache and re-use them."
>> In order to do that, I think I'd need a pool of some kind to check Glorp sessions in/out at request start and completion. Is there a hook in Seaside that the WASession can tie into to do work at those moments?
>> I see references to GlorpSession etc. in the Seaside codebase (the class comment on WAApplication, for instance) but I don't see a package with that around. Is this a VW-specific piece of functionality?
> I don't know but it sounds like somebody already implemented what you need.
> In JPA/Hinternate you would usually create an
> EnityManager/HibernateSesion per request (can be done with a request
> filter). Enities that stay around longer (are referenced from either
> the session or components) would then get dettached/attached on a per
> request basis.
We are of one mind. :) That's exactly what I'd like to know how to do, with Seaside + Glorp. I have used the pattern you describe from Java extensively.
Any direction as to how to know, with Seaside, when requests begin and end would be greatly appreciated.
More information about the seaside