On Thu, 2003-07-24 at 15:17, Eric Sammer wrote:
> Maybe a stupid question, but what would be the functional difference 
> between dumping the object after each request like you say and using the 
> same method as you describe for the TT object below? I ask because I'm 
> currently treating both objects the same way in two or three of my 
> larger applications. I would assume this is to catch premature database 
> shutdown or network trouble between an app server and database (cluster) 
> on a request by request basis? Is this a performance related choice or 
> an Apache::DBI best practices thing?

Apache::DBI already caches it.  It will ping the handle to make sure
it's active and then hand it back to you.  This extra level just skips
the ping if we've already done it on the current request.  If you simply
put the handle in a global, it will not get ping-ed on each requests and
you'll have all kinds of problems when connections time out.

Another approach to the same issue is to use the setPingTimeOut() method
of Apache::DBI.

> > The rest has to do with database work and patterns for
> > building model objects, and I hope to cover that in the article version
> > of the talk I gave about object-relational mapping tools at this year's
> > Perl Conference.
> 
> Is this past tense and if so, is the article up somewhere? Just curious...

I already gave the talk, but have not completed the article yet.

- Perrin

Reply via email to