Re: MySQL connection problems on Tomcat
- From: Hakan <H.L@xxxxxxxxxxxx>
- Date: Sat, 21 Jun 2008 11:13:58 +0200
joeNOSPAM@xxxxxxx 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 läßt sich nach Belieben anpassen ;-)
.
- References:
- MySQL connection problems on Tomcat
- From: Hakan
- Re: MySQL connection problems on Tomcat
- From: joeNOSPAM@xxxxxxx
- MySQL connection problems on Tomcat
- Prev by Date: Re: MySQL connection problems on Tomcat
- Next by Date: Re: MySQL connection problems on Tomcat
- Previous by thread: Re: MySQL connection problems on Tomcat
- Next by thread: Re: MySQL connection problems on Tomcat
- Index(es):