Re: [cx-oracle-users] Session pool
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2005-05-17 19:31:58
|
Its not much of an example but there really isn't much that is different from using connections the normal way. import cx_Oracle pool =3D cx_Oracle.SessionPool(user, password, tnsentry, minConnections, maxConnections, increment) connection =3D pool.acquire() where minConnections is the minimum number of connections to retain in the pool, maxConnections is the maximum number of connections in the the pool and increment is the number of connections to acquire when there are no free connections in the pool. After that you can treat the connection as you usually do. Be aware, however, that package state __is__ retained when the connection is released back to the pool (which happens when the connection object goes out of scope or pool.release(connection) is called) so if your application makes use of that, deal with it appropriately. On 5/17/05, Richard Moore <ri...@we...> wrote: > Hi all, >=20 > Does anyone have an example of how to use the cx_Oracle session > pool? >=20 > Cheers >=20 > Rich. > -- > Richard Moore, Principal Software Engineer, > Westpoint Ltd, > Albion Wharf, 19 Albion Street, Manchester, M1 5LN, England > Tel: +44 161 237 1028 > Fax: +44 161 237 1031 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&op=3Dclick > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |