[CDBI] Ima::DBI with Class::DBI question

Carlos Vicente cvicente at network-services.uoregon.edu
Fri Mar 27 18:20:58 GMT 2009


Hi all,

I'm a bit confused by the part of Ima::DBI's documentation that talks
about adding something like:

$r->push_handlers(PerlCleanupHandler => sub {
       MyImaDBI->rollback();
   });

in mod_perl environments in order to preserve a functionality covered by Apache::DBI.  

Is this necessary when using Ima::DBI via Class::DBI?  After adding this (in my Mason handler), I started seeing these errors in my Apache logs:

DBD::mysql::db rollback failed: Rollback ineffective while AutoCommit is on at /usr/lib/perl5/site_perl/5.8.8/Ima/DBI.pm line 596

I suppose it has to do with the fact that AutoCommit is on by default with Class::DBI (and I want it that way).  

What's the suggested setup in this case?  

Thanks in advance,

cv



More information about the ClassDBI mailing list