On 4/5/06, Matt S Trout <[EMAIL PROTECTED]> 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

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

Reply via email to