FWIW, we are discussing the internal DBI pooling mechanism at the dbi-dev list and having already a sort-of-working prototype. So hopefully there will be no need for Apache::DBI in the near future, as DBI will be able to handle pooling internally. However it may take some time, as the drivers will have to adjust to support the new functionality.

You can see the thread here:
http://archive.develooper.com/[EMAIL PROTECTED]/index.html#02118

Some working examples are attached to this message:
http://archive.develooper.com/[EMAIL PROTECTED]/msg02134.html

Haroon Rafique wrote:
My setup is as follows:

Apache/2.0.44 (Gentoo/Linux) mod_perl/1.99_08 Perl/v5.8.0

mod_perl was built from CVS.

I was interested in getting Apache::DBI to run under mp2. I did read Ask's message at http://marc.theaimsgroup.com/?l=apache-modperl&m=104225578207460&w=2
which leads me to my question. What would it take to get connect_on_init to run under mp2?


With the following patch I was able to get connect_on_init to work under mp2. Remember that my objective was to JUST get it to run. This is NOT release quality code. I'm happy to report that it works for me, so far. Anyone else who is running mp2 (no compat mode) willing to give it a try?
Of course, then the gurus can come in and clean up the code so that it works under either mp1 or mp2.

If you apply the following patch (will commit it soon) against the modperl-2.0 source, you will be able to use connect_on_init unmodified, assuming that Apache::compat was loaded before Apache::DBI. Let me know whether it works for you.


Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.81
diff -u -r1.81 compat.pm
--- lib/Apache/compat.pm        19 Feb 2003 23:55:23 -0000      1.81
+++ lib/Apache/compat.pm        3 Mar 2003 23:49:19 -0000
@@ -125,6 +125,16 @@
     die $err if $err;
 }

+sub push_handlers {
+    shift;
+    Apache->server->push_handlers(@_);
+}
+
+sub set_handlers {
+    shift;
+    Apache->server->set_handlers(@_);
+}
+
 package Apache::Constants;

use Apache::Const ();




__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to