Re: [cx-oracle-users] Time out parameter for connect?
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2005-10-25 14:06:18
|
Hmm, I think more information is definitely needed. What precisely do you want? A timeout on the actual connect itself? A timeout on each statement that is executed by the connection? A timeout on something else? The only OCI (Oracle Call Interface) method that deals with timeouts is OCITransStart() and requires implicit transactions started for you. Be aware of another option (depending on your needs) in the creation of profiles on the Oracle database -- those allow you to specify a fair number of parameters. On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > Anthony, > > Thanks for the quick response. > > I'd like to be able to specify a timeout parameter as in this example: > > connection =3D cx_Oracle.connect(user,password,dbstring,timeout) > > where the connection would timeout after timeout expires. > > This would allow you to control max time per connection call. > > Do you need any more information? > > Thanks, > Gerardo > -----Original Message----- > From: cx-...@li... > [mailto:cx-...@li...] On Behalf Of > Anthony Tuininga > Sent: Monday, October 24, 2005 2:00 PM > To: cx-...@li... > Subject: Re: [cx-oracle-users] Time out parameter for connect? > > Could you provide more information about what you desire? A quick Google > search indicates that there is a "timeout" parameter for the > OCITransStart() call but that's all. Is that what you are referring to? > If not, what are you referring to? Depending on what you need and what > platform you are running on, one option is to create a thread with a > timer and upon the expiration of the timer cancel the cursor if its > still running. You can't do this on Windows -- you probably need the > OCITransSatart() call for that purpose. Its not wrapped by cx_Oracle > today so I'd need more information if you want me to implement it. > > On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > > > > > > Is there a way to specify a timeout parameter to the connect method? > > > > Or, is there another way to incorporate a timeout parameter for > cx_Oracle? > > > > Thanks, > > Gerardo > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course Free > Certification Exam for All Training Attendees Through End of 2005 Visit > http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |