[DB-SIG] Consistent connection to Oracle
Eugene V . Dvurechenski
jno@glasnet.ru
Fri, 7 Dec 2001 09:45:55 +0300
no way in plain vanilla CGI technology (do you need it for web?).
you may check something like PCGI instead.
another way is to use something like medusa's asyncore
to build a connection sharing server then feed all the
queries via this shared connection[s] pool.
NB: there are good chances that you'll not be able to use
_threading_ with Oracle clinet libs. hence, synchronous
approach looks much better. "forking" approach will not
work as expected either.
On Thu, Dec 06, 2001 at 05:56:12PM -0800, Titu Kim wrote:
> I am wondering how can i keep using the same
> connection to Oracle Database through DCOracle2. In my
> cgi script, i do
> ##############################
> connection =
> DCOracle2.connect(dsn="username/password@db")
> c = connection.cursor()
> ##############################
> at the beginning of the script and i close the
> connection at the end of the script using
> connection.close(). How can i place this connection so
> it is reusable without reconnecting for every request?
--
SY,
jno (PRIVATE PERSON) [ http://www.glasnet.ru/~jno ]
a TeleRoss techie [ http://www.aviation.ru/ ]
If God meant man to fly, He'd have given him more money.