Add in validationQuery and testOnBorrow as seen below
<Resource driverClassName="com.mysql.jdbc.Driver" logAbandoned="false" maxActive="35" maxIdle="2" maxWait="5000" name="jdbc/TheName" password="password" removeAbandoned="true" removeAbandonedTimeout="60" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/schema" username="user" testOnBorrow="true" validationQuery="SELECT 1"/> On 01/27/2011 12:46 AM, Ramon Garcia Alarcon wrote:
Hi all, I have a problem with: Tomcat 6.0.x + MySQL 5.1 + mysql-connector.5.1.x And I test with Ubuntu 10.04, Windows 2003 and Mac OSX 10.6.6 I configured the connection in tomcat like this: <Resource driverClassName="com.mysql.jdbc.Driver" logAbandoned="false" maxActive="35" maxIdle="2" maxWait="5000" name="jdbc/TheName" password="password" removeAbandoned="true" removeAbandonedTimeout="60" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/schema" username="user"/> In MySql I have good configured the wait_timeout and the interactive_timeout in 28800. The problem is that the pool never removes the connection and when the mysql closes it, I got this exception: java.sql.SQLException: Already closed Some idea? These configuration was worked properly in MySQL 4.1 and Tomcat 5.5.. Thanks! Ramon Garcia
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org