On Nov 16, 7:46 pm, David Pollak <[email protected]> wrote: > On Mon, Nov 16, 2009 at 2:24 AM, Jeppe Nejsum Madsen <[email protected]>wrote: > > > > > Hi, > > > I've solved my issues with using SessionVars during rewrite, but during > > this, I noted that quite a few DB connections are created during the > > rewrite phase: It seems every Mapper query opens a connection, executes > > the query and then closes the connection. > > Yes. The rewrite phase happens before any scope (other than request var). > The "around" stuff is part of the S scope... so you don't get the > transactional wrapping. > > After seeing all the thrashing that's going on here, I think I'm going to > introduce a second re-write phase after the S scope has been entered. > Basically, there'll be a stateless rewrite phase so you can do a rewrite > that's going to deal with determining if it's a Lift request (or should be > passed to the servlet filter chain) and to see if it matches the stateless > stuff. > > The second rewrite phase will be within the S scope and have the > SessionVars, etc. wrapped around it. > > I think this will address your issues. Sound good?
Sounds great! While not completely understanding all implications, I think this will solve the issues. I could imagine scenarios where it would be beneficial to have a single transaction that spans both rewrite phases, but can't think of a good use case atm :-) /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
