HI Jason,
                        
        Have a look at the source of Apache::DBI.

        An important part of the module is a ping method that ensures the
connection handle (e.g., $dbh) doesn't go stale.
                
        You can write your own ping method by doing something like:
        
        $dbh->do("select 1")

        Which should return true (i.e., 1) if your handle is OK (unless
your using Interbase where 'select 1' blows up!! ).

        We maintain persistent database connections per child without 
using Apache::DBI. 

        Each child has its own lexically scoped database handle. We
periodically ping the handle to make sure it is still alive -> if it isn't
we create a new connection.

        This system works because we only talk to one database with one
user. If you have lots of databases and/or database users you will need
something more exotic.

Regards,


NIge


Reply via email to