On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > my $db = MyApp::DB->new; > $self->my_db($db); # a new db for a new transaction > $db->begin_work; # Start transaction > > ... create two objects and save them ... > > die "Does it roll back?"; > $db->commit;
I don't see any rollback there. It's a common practice to put an automatic rollback in a cleanup handler when running mod_perl. Another approach is to catch exceptions and issue the rollback there. If you did one of those, this would work. Otherwise, I don't see how you expect it to get rolled back. > Edit: It is even more mysterious: The saved records are only there as > long as apache isn't restartet. I tried clearing the cache, calling the > records in different ways, no matter they are there. After a restart > they are not. It looks as if the rollback is not done at the "die" of > the script but the 'kill' of the server ?!? That implies that they aren't committed either, and that you are running with a "dirty read" isolation level that lets you see data that hasn't been committed yet on other database connections. Either that, or you are somehow using the same connection in multiple processes, which would be very bad. - Perrin ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object