Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Hakan" Subject: Re: MySQL connection prob Message-ID: <1214039638.87@user.newsoffice.de> X-Comment-To: comp.lang.java.databases Newsgroups: comp.lang.java.databases In-Reply-To: <3cc7bb54-29ef-4a69-a89d-31830003e9e3@s21g2000prm.googlegroups.com> References: <3cc7bb54-29ef-4a69-a89d-31830003e9e3@s21g2000prm.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 28 Date: Wed, 27 Apr 2011 15:22:17 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303917737 96.60.20.240 (Wed, 27 Apr 2011 10:22:17 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:22:17 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.databases:193 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