[Dbix-class] Apache::DBI and DBIx::Class
Brandon Black
blblack at gmail.com
Wed Apr 5 17:28:19 CEST 2006
On 4/5/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>
> The user in question has other non-DBIC code in the same mod_perl.
>
> That's the rub.
>
Ah, I was missing that somehow. It's true that current DBIC doesn't
"play nice" with another non-DBIx::Class application under the same
mod_perl and Apache::DBI using the same database, in that the other
application will get a seperate connection from ours, causing two
connections per child overall.
I'm not even entirely sure that it's safe/sane for us to share $dbh's
by default with the legacy Apache::DBI application, as there's a lot
of potential for the other app's code to then break us by modifying
the active $dbh, sharing ->prepare_cached statements with us, txn
stuff, etc. The same is probably true in reverse of DBIC's ability to
"break" the $dbh for the other application.
Perhaps there should be a "share_with_apache_dbi" option in
Storage::DBI's connect_info params (in that 5th-param hashref where
on_connect_do, quote_char, etc got put recently?), that the user can
turn on if they think it will work fine for them?
-- Brandon
More information about the Dbix-class
mailing list