Re: PyDO2: How to handle DB restart?
Faber <[email protected]> Sun, 25 Jun 2006 19:07:08 +0200
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Organization | FaberBox |
| Message-ID | <[email protected]> |
On Saturday 24 June 2006 16:00, Jacob Smullyan wrote: > > "ProgrammingError: terminating connection due to administrator command > > server closed the connection unexpectedly > > This probably means the server terminated abnormally > > before or while processing the request." > > > > How could I avoid this exception? > I believe you want to subclass ConnectionPool and override onHandOut() > to perform an additional test on the connection, such as performing a > fast test query (a la "SELECT 1"). If onHandOut() returns False > you'll get a new connection. Thank you Jacob, I'll try to override onHandOut() and see if it works for my application. Regards -- Faber http://faberbox.com/ http://smarking.com/ Last.fm music profile: http://www.last.fm/user/MrFaber/ Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642