RE: [cx-oracle-users] Time out parameter for connect?
Brought to you by:
atuining
From: Molina, G. <Ger...@sc...> - 2005-10-25 20:21:40
|
The only parameter I'm aware of relating to timeout on sqlnet is sqlnet.expire_time. But this is for disconnecting idle sessions after a specified amount of time. This is not exactly what I'm looking for - terminating an attempted connect after a specified amount of time. I very much appreciate the insightful feedback everyone has given already. Thanks, Gerardo=20 -----Original Message----- From: cx-...@li... [mailto:cx-...@li...] On Behalf Of Paul Moore Sent: Tuesday, October 25, 2005 12:46 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Time out parameter for connect? On 10/25/05, Anthony Tuininga <ant...@gm...> wrote: > I don't believe there is any method in the OCI that allows you to=20 > specify this value. Googling certainly suggests as much (others have=20 > asked for this capability and been told that it does not exist). Note=20 > that SQL*Net does allow you to specify such things so perhaps you need > to look at the SQL*Net configuration. I have certainly wanted this and never found a suitable way of managing it. You can do the connect in a thread, and wait for the thread to complete for a set time. If the connection hasn't been made by then, you can do whatever you want on a timeout (report an error, whatever). But if you then want to end your program, you'll need to wait for the thread - if you don't (for example, by making the thread a daemon) I've found you can get odd crashes or other errors (I never worked out why, or managed to put together a useful test case - I just marked it down as "don't do that"). I'm not quite sure how you configure SQL*Net to time out after a given period. I remember looking, but I don't recall finding any suitable parameter. Paul. ------------------------------------------------------- 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 |