I decided to use DBCP mainly because I was getting timeouts on my database connections. In theory, once you define a "validation query", DBCP will by default run that query on the connection before using it, so you always know the connection is OK.
I set it up two weeks ago and it seemed to work. However, last night I got a timeout exception on a connection.
On my dev machine the code survives a MySQL restart without a problem, so I guess DBCP is doing something.
How should I proceed investigating this? Do you use DBCP for this purpose?
(Just deleted 50 lines or so of more detail, trying to keep the question readable. Let me know if some crucial info is missing).
EDIT: Guess I should have read this question before I started...