Thanks for your answer. When i look at the error_log after enabling $Apache::DBI::DEBUG, i see that Apache DBI is always giving me the same handler with the default parameters parameters from my DBI Connect :
I use a Database object to encapsulate the call to DBI. Here is the constructor :
sub new {
my $pkg = shift;
my $user = $ENV{DB_USER} ;
my $password = $ENV{DB_PASSWORD} ;
my $dsn = $ENV{DB_DSN} ;
my $dbh = DBI->connect($dsn,$user, $password, { AutoCommit => 1, RaiseError => 1 } )||
die "ERROR NO_CONNECTION_TO_POSTMASTER\n";
my $obj = {_dbh => $dbh};
bless $obj, $pkg;
return $obj;
}
And all my other objects calls this contructor with :
my $db = new Database();
Then when i need to change autocommit parameters, i do a simple $db->{_dbh}->{AutoCommit} = 0;
What i can see is that i can't modify the database handlers pool from Apache::DBI, all i can do is modify my local copy.
Next time one of my object ask for the same DBI handler, i get the original with AutoCommit == 1;
Christophe
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.