On Sun, Feb 13, 2011 at 8:23 PM, Damon Courtney <[email protected]> wrote:
> I usually would just create a single DIO object in the global namespace if it 
> didn't already exist.  Something like:
>
> if {[info commands ::DIO] eq ""} {
>    ## Create ::DIO object
> }
>
> I did that as part of the initialization of my code.  Since the created 
> connection exists in the global namespace, it doesn't get deleted when the 
> ::request namespace is destroyed, so it sticks around between invocations.

Ah, that's a good tip. Could the open connection be source in as a
part  the ChildInitScript directive and the close connection would be
in the ChildExitScript directive?

One additional question though. What's the standard Rivet way to
'ping' the database before using the connection? I'm looking for
something similar to the Apache:DBI's ping() method.

Thanks
--
rv

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to