Re: [cx-oracle-users] Thread commits - do other threads get committed? Use Pooling?
Brought to you by:
atuining
From: Chapman, S. <Sco...@pi...> - 2010-11-10 01:20:47
|
-----Original Message----- From: Amaury Forgeot d'Arc [mailto:ama...@gm...] Sent: Tuesday, November 09, 2010 4:01 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Thread commits - do other threads get committed? Use Pooling? > > 2010/11/10 Chapman, Scott <Sco...@pi...>: > > If I use pooling, do I need to make the Connections threaded=True? (I'm > > thinking no, because each thread will grab a connection from the pool, > > begin and commit a transaction and release it's connection back to the > > pool). > Yes you need "threaded=True"; this is mostly a signal for the Oracle > OCI library to synchronize access to shared resources like memory and > other global structures. You're saying the threaded flag is doing more than the cx_Oracle docs say it does, "indicates whether or not Oracle should use the mode OCI_THREADED to wrap accesses to connections with a mutex." This is supposed to be used when different threads are using a Connection object simultaneously. If you're got a Connection Pool then each thread acquires the connection for the duration and so I'm thinking threaded does not need to be set. Are you quite sure of your interpretation of the flag? This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction. |