Hello List, My application is configured for JDBCRealm authentication uses a MySQL database. For my own use inside the application, I have setup a connection pool to access the database, However, the configuration of JDBCRealm in server.xml uses astand-alone connection. Since MySQL times-out connections after 8 hours, I get the following error in tomcat logs as I try to log-in after the connection times out:
Oct 7, 2012 8:36:51 AM org.apache.catalina.realm.JDBCRealm getPassword SEVERE: Exception performing authentication com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver. Users do not notice this error (I presume tomcat's JDBCRealm will create a new connection), but it is disconcerting to have all these exceptions in tomcat logs, especially that when the server goes into production mode, I fear this will have adverse effects. Is it possible to have JDBDRealm use the same connection pool which my application uses (which is setup in tomcat's context.xml so it should be accessible to all applications in tomcat). Thanks.