Hi Kevin, thanks for that.

Unfortunately, the notrans option isn't really what I'm looking for as
a number of methods do need to be wrapped in a transaction - I need
method level transaction control rather than engine level.

This documentation: 
http://www.sqlalchemy.org/docs/04/session.html#unitofwork_managing
seems to be the best option available, but it means I can't just 'from
turbogears.database import session' anymore...

James

On Feb 5, 5:11 pm, "Kevin Horn" <[EMAIL PROTECTED]> wrote:
> On Feb 5, 2008 4:42 PM, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Em Tuesday 05 February 2008 19:12:07 James escreveu:
>
> > > A lot of my controller methods are read-only (apart from the identity
> > > management), and yet a new transaction is being created for every
> > > single page load at the moment.
>
> > By default every @expose()d method is wrapped within a transaction.
>
> > > Is there a better way for me to get my hands on a session which gives
> > > finer control?
>
> > You can disable transactions and control them manually on the few methods
> > where you write to the database...
>
> > I don't remember the exact syntax for that but I am sure it is on the list
> > archives.
>
> It's in the 
> docs:http://docs.turbogears.org/1.0/Configuration#turbogears-dev-cfg-and-p...
>
> "If you put notrans_ in front of the URI, the automatic database
> transactions will be turned off."
>
> Give that a try, and let us know if that's what you needed.
>
> Kevin Horn
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to