On 5/30/06, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
>
> On 5/30/06, Jorge Godoy <[EMAIL PROTECTED]> wrote:
> > What about moving the transactions code from the expose() decorator to a
> > decorator by itself?  Adding boilerplate code would just require the new
> > decorator and using our own code would be "easier"...
>
> This sounds good too. There must be access to the Session from inside
> the controller-method though, since it's used to make queries, save
> new objects, delete stuff etc.
>
> Maybe we could then have a config option, akin to "always allow json"
> that would in effect wrap all controller-methods in such a decorator.
> Turning that option on, wouldn't we acheive what Kevin suggested
> earlier?

The reason middleware (or a CP filter, at present) is actually a good
way to do it is that the transaction boundary seems cleaner. You know
when you're starting the request and ending the request, and you can
start and stop the transaction to match.

Going the decorator route is okay, though, because it doesn't lose
anything over our current implementation.

Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to