On Wed, Aug 26, 2009 at 4:03 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:

>
> Hi,
>
> I'm using POJT (plain old JDBC transactions :-) with a single db. I
> would like to:
>
> 1) Manually rollback changes if some validations fail
> 2) Have the tx rolled back if an error happens
>


>
>
> I think 1) can be achieved by DB.rollback(DefaultConnectionIdentifier),
> but in general, how do I get the current connection active for the
> request?


DB.use(DefaultConnectionIdentifier) {
  superConn =>
}


>
>
> 2) I think can be implemented by adding a handler to
> LiftRules.exceptionHandler and perform the steps in 1).


Actually, this used to be done automatically... and somehow the code that
did it went away... sigh.  Lemme see if I can check something in that'll fix
the situation.


>
>
> Are there any better ways to handle this?
>
> /Jeppe
>
>
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to