-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chuck,
On 10/9/2009 11:04 AM, Caldarale, Charles R wrote: >> From: pprun [mailto:runping_hu...@hotmail.com] >> Subject: DataSourceRealm failed to retrieve password after tomcat >> server being idle overnight >> >> When I left server idle overnight and tried to login >> into the application the next day, DataSourceRealm >> would fail in retrieving password. > > Not uncommon - the DB server timed out the session. Try adding this to your > <Resource>: > > testOnBorrow="true" > validationQuery="/* ping */ SELECT 1" The error message is definitely misleading, though, since it says "Connection is already closed" when calling conn.close(). That message makes it seem like the DataSourceRealm has a bug in it that is attempting to close the connection multiple times (or is holding on to a reference to a Connection returned to the pool earlier). I suppose DataSourceRealm could use conn.isClosed() before the call to close(), but that would probably just clutter the code unnecessarily. It would, however, remove the misleading error message. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrPkTYACgkQ9CaO5/Lv0PAVFQCfYkGvY89mtALjTtDvvP3w7UuS GigAn0UYHM0H3cMYMWuvwJxcmyMp+Pfy =QKSW -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org