Anupam Gupta
Anupam Gupta

Reputation: 1687

disable retry attempts by dbcp connection pool

I am using commons-dbcp connection pool, in case of Mysql connection loss the pool retries multiple times before "giving up". The downside is it waits toooo long before returning back. I need a way through which I can disable these retries so that I can handle the exception accordingly. Application is spring based.

Upvotes: 1

Views: 1467

Answers (1)

Andrey Borisov
Andrey Borisov

Reputation: 3170

maybe you can switch to c3p0 according to this blog http://psponcoding.blogspot.com/2012/02/database-connection-timed-out-but-how.html

Upvotes: 1

Related Questions