fraped
fraped

Reputation: 101

c3p0 Java Database Pooling, failover configuration

When a database is down then automatically the ip and port switch to another db server.

How should I configure c3p0 connection pooling of my web apps to follow this Database failover mechanism?

Currently, I am using c3p0, however in the last db failover, pool connections failed to reestablished.

Upvotes: 8

Views: 1567

Answers (1)

fraped
fraped

Reputation: 101

Reestablished after a failing request. Attributes that helps to come over as soon as possible

  • p:testConnectionOnCheckin="true"
  • p:preferredTestQuery="SELECT @@VERSION"
  • p:acquireRetryAttempts="10"

Upvotes: 2

Related Questions