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: Oralce/OCI Multi-threading question ?

Re: Oralce/OCI Multi-threading question ?

From: Amit <jindal_at_roguewave.com>
Date: 17 Apr 2003 15:19:48 -0700
Message-ID: <d214e6c6.0304171419.2f4079a7@posting.google.com>


"Srinivas B.S.S" <bsssrinivas_at_lycos.co.uk> wrote in message news:<3E8E9378.5090003_at_lycos.co.uk>...
> Hi,
>
> How Oracle handles the TNS requests by default ? i.e. without enabling
> any multi-threaded options. Will it handle them serially(one after
> another) ?
>
> I have a multi-threaded application in which each thread owns a
> connection object(hence, OCI handle) exclusively. But the sniffer
> trace looks like all the TNS requests from the application are being
> sent one after another like a single threaded application ?
>
> OCI handle is initialized with OCI_THREADED flag, but in this case,
> it should cause OCI to maintain extra mutex and some extra processing,
> not the observed behavior. Any thoughts on this ?
>
> Thanks,
> Srinivas.

Does each thread have its own OCIEnv* ?
Every OCISvcCtx* (or connection) is associated with a OCIEnv* and if you initialize OCIEnv* with OCI_THREADED mode without a OCI_NO_MUTEX then _every_ OCI call will be mutexed.

Since this mutexing is at OCIEnv* level separate env pointers will help.

Amit
Development Engineer
http://www.roguewave.com/products/sourcepro/db/ [Disclaimer: All views expressed here are my personal views and they can be incorrect at times] Received on Thu Apr 17 2003 - 17:19:48 CDT

Original text of this message

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