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.
Damon
On Feb 13, 2011, at 8:06 PM, Ramesh Venkitaswaran wrote:
> Hello
> As I was looking through the dio*tcl code in general and
> dio_Oracle.tcl, in particular, it seems like the code opens and closes
> a database connection every time a "open" or "close" method is called.
> (It calls "oralogon" and a "oralogoff"). In oracle establishing a
> connection is a fairly expensive process and I would like to re-use
> connections as much as possible. Is there a setting where each child
> process could re-use an already established connection? I'm sort of
> thinking along the lines of mod_perl's Apache::DBI where calling a
> disconnect() is turned into a no-op and a connect() figures out if
> there's an existing connection and hands it off to the client.
>
> [please Cc me, as I'm not subscribed to the list. Thank you]
>
> --
> rv
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]