Re: java.sql.SQLException: Already closed..strange!

2008-12-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, Ken Bowen wrote: validationQuery=select 1 validationQuery=/* ping */ SELECT 1 would be better. Newer versions of Connector/J will detect the ping comment and use an even cheaper connection test than what is required to execute this (rather

Re: java.sql.SQLException: Already closed..strange!

2008-12-28 Thread Ken Bowen
You're probably running into the fact that MYSQL closes connections which have been open too long. Probably if you make the request to the server again, you'll find that it works because the connection is reopened. One way to deal with this is to add the following to your context.xml

RE: java.sql.SQLException: Already closed..strange!

2008-12-28 Thread Martin Gainty
DBCP documentation says you need to validateConnection(connection) before you close it e.g.http://wiki.apache.org/commons/DBCPMartin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official

Re: java.sql.SQLException: Already closed..strange!

2008-12-28 Thread David Smith
Can you post relevant portions of your code? This smells like your code is accessing the underlying connection object DBCP wraps and closing that instead of the DBCP connection object. That'll subvert DBCP and give you problems. --David gbattine wrote: Hello guys, I've a strange problem with

Re: java.sql.SQLException: Already closed..strange!

2008-12-28 Thread David Smith
DBCP documentation says you need to validateConnection(connection) before you close it No you don't. Just close the connection DBCP returned when you called DataSource.getConnection() --David Martin Gainty wrote: DBCP documentation says you need to validateConnection(connection) before