Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to use OCI/ODBC in multi-process programs?

Re: How to use OCI/ODBC in multi-process programs?

From: Jason Liang <jxnliang_at_yahoo.co.jp>
Date: 20 Sep 2004 17:27:02 -0700
Message-ID: <caf30d77.0409201627.54c06d23@posting.google.com>


Thank you very much, guys.

I had a good leason from you.

Regards,

Jason Liang

Sree <replyto.newsgrp_at_nowhere.com> wrote in message news:<414E9DB3.6060401_at_nowhere.com>...
> Jason Liang wrote:
>
> > I can't use thread, because I have to use another library that is not
> > thread-safe.
> >
> > I know if I open a file before forking a process, then the child
> > process will inherate the open file descriptor. I am not sure if a
> > child process inherate an open database connection - using OCI or
> > ODBC.
> >
> Right now there is no way through OCI to share a connection among
> processes. Fork replicates file descriptors and also the OCI handles,
> but you can get undefined results if you try to use the replicated OCI
> handles in both the parent and child(you should be able to use just one
> of them though!).
> Connection pool would be a good entry point to implementing the required
> feature. However, currently, the connection pool is single-process. If
> Oracle makes it shareable across processes, not necessarily just
> parent-child, that'l be a solution to you among others. You can try to
> file a request for this feature with Oracle!
>
> Thanks,
> Sree
Received on Mon Sep 20 2004 - 19:27:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US