Hi,
I encountered the following problem with this configuration:
-Fedora1.2.1
-MySQL 4.0.15
-as JDBC-driver: mysql-connector-java-3.0.14
MySQL by default closes idle connections after *8* *hours*.
After that by any new database request the following Exception will be
thrown:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1388)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1532)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1923)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2233)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2181)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158)
at
fedora.server.storage.lowlevel.DBPathRegistry.get(DBPathRegistry.java:104)
...
I realized that fedora adapted the connectionpool implementation from
http://www.coreservlets.com/.
So far so good, but it is not resistant against the MySQL phenomenon*.
*I would ask the fedora-developers, why not to use the Database
Connection Pool implementation from Apache or the JNDI-Feature in Tomcat
4 and above, where the timeout problem not occurs?
Jochen