On Tue, 2005-11-15 at 20:54 -0300, Leandro Lucarella wrote: > What about a different decorator? I don't think is a good idea to keep > adding complexity to expose. And the transaction is not orthogonal to > exposure, you can have no-exposed event wrapped in a transaction an vice > versa.
I am in the process of ripping most of the functionality out of expose so it will be much simpler than the current expose. You will also have the option of using the in_transaction decorator directly if you want to go that route (see below). Based on feedback, I am planning to add a configuration directive to let you enable transactions by default for exposed methods if you want. This way those that want transactions on by default and those that want them off can both have their way. If you have transactions off, then you can enable them for a particular method by passing transaction=True to expose, or you can use the in_transaction (name suggestions are welcome) decorator directly. Also, the HTTPRedirect and InternalRedirect exceptions will not cause a rollback when in a transaction - all other exceptions will. If anyone wants any other exceptions to not cause a rollback, let me know. I think this covers all of the issues everyone has raised so far? Thank you everyone for your feedback. Sean

