very interesting.  I might suggest a config option to toggle the functionality within Apache::DBI instead of a new module entirely.  Or maybe including it as another module within the Apache::DBI distribution. I don't know how everyone else feels, but all the stuff in the Apache:: namespace is generic and this being largly Apache::DBI except for an Oracle specific enhancement doesn't sound like it warrants it's own thing.  But certainly don't let me be the final word :)
 
your enhancement, if user configurable within Apache::DBI, might make it possible to jump between cached or reauthenticated connections on a vhosts basis.  Now that's cool...
 
BTW, I did submit a (rather ugly) fix for a (minor but important to me) bug in Apache::DBI way back in december - it was never implemented by the author for unknown reasons - see http://marc.theaimsgroup.com/?l=apache-modperl&m=94699007507299&w=2 for the details if you are interested.
 
--Geoff
 
-----Original Message-----
From: Jeff Horn [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 1:57 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Fw: Apache::DBI using 'reauthenticate' instead of caching

Gentlemen:
 
Have you had any time to look at this?  I'm attatching my modified version of Apache::DBI.  Please send me your comments and concerns as I would like to send this out to the mod_perl and DBI community very shortly.  I thank you for your time!
 
----- Original Message -----
From: Jeff Horn
Sent: Tuesday, June 20, 2000 7:50 PM
Subject: RFC: Apache::DBI using 'reauthenticate' instead of caching

Gentlemen:
 
John Groenveld suggested that I run this by each of you.  I have made a hack to Apache::DBI which uses the Oracle specific DBD call to
$dbh->func($user, $pwd, 'reauthenticate') to maintain a single connection per Oracle database and then simply reauthenticate on the existing connection.  This turns out to be 5-6 times faster than initiating a brand new connect for each script.
 
Now, this is slower than straight Apache::DBI in an environment where the same connect string is used for every script running on a web server.  However, it is a definite win in situations where database level security is being used and there are large numbers of logins!
 
If you have any time to look at this I'd be most appreciative.  I'd like to contribute this to CPAN as soon as I run it by a few more people and add a few bells and whistles.  Your suggestions as to what to name the new module would also be appreciated.  Currently it's implemented as a replacement for Apache::DBI (and steals the name), but before I submit it I want to rename the module (perhaps to something like Apache::DBI::Reauth).
 
One problem that needs to be addressed before making this generally available is that I need to set DBI attributes back to their defaults and then reset any specified in the connect string before returning the database handle.  This is not a problem in my current environment, but will be in a general environment.  Any other problems you see with the code are appreciated!
 
Thank you so much for your valuable time!
 
-- Jeff Horn
 
 

Reply via email to