DBCP and Hibernate on Spring, doesn't re-open dead connections, why?

If you set testOnBorrow you must also set validationQuery.

If you set testOnBorrow you must also set validationQuery - validationQuery - The SQL query that will be used to validate connections from this pool before returning them to the caller. If specified, this query MUST be an SQL SELECT statement that returns at least one row. I have also set timeBetweenEvictionRunsMillis so the dead connections will be evicted from the pool.

– gotch4 Apr 13 at 8:29 It should be a tiny query that runs very fast. Assuming bernate runs several not tiny queries for each connection, one more tiny query should not effect performance. – Tarlog Apr 13 at 9:06 hm.... Yeah I see, I used SELECT 1 (it's suggested on the dbcp wiki).

Anyway, I think that hibernate will get a connection everytime it opens a session. This means roughly everytime the controller processes a request. I hope this is just a mySQL related issue.

– gotch4 Apr 13 at 12:48.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions