Re: [cx-oracle-users] best way to detect and recover broken connection?
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2006-12-04 14:34:31
|
No, there is no way to globally catch a disconnection. The first time you will be aware of it is when you make a query and the exception "not connected to database" (or something similar) is raised. A number of people perform a "ping" first (execute the statement "select 1 from dual") before attempting their own query. If that query fails, they estabilish a new connection and use that instead. I'm not aware of any other techniques so if anyone else has any to share, please do so. On 12/4/06, Mark Harrison <mh...@pi...> wrote: > Here's kind of a general connection question. > > I've got an application server (xml-rpc based) with > a long-lived persistent connection. > > Of course, the appserver needs to handle the eventuality > that the connection will be closed at some time. > > What's the best way to handle this? Is there some nice > way to globally catch a disconnection and automatically > reconnect, or some such? > > Many TIA! > Mark > > -- > Mark Harrison > Pixar Animation Studios > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |