I have been using DBI without Apache::DBI and have been simply
storing db connections in a global variable as a sort of poor man's
persistent connection when running under Apache::Registry.
Now I want to do things "right" and am trying to understand
Apache::DBI. Before looking at the module I imagined that it would
work by providing a library of persistent connections. You would
check a connnection out of the library, use it, and then put it back
when you are done, like checking a book out of the library. If you
disconnected the connection, you just wouldn't return it, and the
pool would have to create a new connection for the next user.
But this is not the way Apache::DBI works. Instead, if I understand
correctly after glancing at the module this morning, two consecutive
identical connect calls will return the same connection! Why isn't
this a problem? Is the assumption that two different transactions
will use different user/pwd combinations?
Thanks,
Tim