Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #193
| From | "Hakan" <hakan@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: MySQL connection prob |
| Message-ID | <1214039638.87@user.newsoffice.de> (permalink) |
| Newsgroups | comp.lang.java.databases |
| References | <3cc7bb54-29ef-4a69-a89d-31830003e9e3@s21g2000prm.googlegroups.com> |
| Date | 2011-04-27 15:22 +0000 |
| Organization | TDS.net |
To: comp.lang.java.databases joeNOSPAM@BEA.com wrote: > I'm guessing the 'connector' has a simple JDBC connection underneath, > which is killed after a time of idleness, perhaps by a firewall or > a DBMS setting for idle sessions. One simple hack would be to store > each successful time-of-use in the servlet, and at each invoke, > compare the current time to the last successful use, and if it > hasn't been used for an hour (experiment to find the right value) > you must re-create connector. I'd see about the DBMS parameters > that might be killing the connection out from under you. > HTH, > Joe Weinstein at Oracle You are right that I had missed to close the MySQL driver connection. I have now added close statements whenever I exit the application in the code and a shutdown hook closing the database driver connection on unvoluntary shutdowns. Thank you for your help. -- Newsoffice.de - Die Onlinesoftware zum Lesen und Schreiben im Usenet Die Signatur lE#t sich nach Belieben anpassen ;-) --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Next in thread | Find similar
MySQL connection problems "Hakan" <hakan@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: MySQL connection prob "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: MySQL connection prob joeNOSPAM@BEA.com.remove-dii-this - 2011-04-27 15:22 +0000
Re: MySQL connection prob "Hakan" <hakan@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: MySQL connection prob "David Harper" <david.harper@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
csiph-web