R
R
Riard Brugekaaim2015-07-14 11:14:15
Java
Riard Brugekaaim, 2015-07-14 11:14:15

How to force c3p0 to check the connection?

This pool has the ability to attach a class that will do this check.
But the joke of humor is that the basic methods of the Connection class (.isValid() .isClose) are not supported by the c3p0 version that is attached to hibernate.
I tried to attach a new one (they promise that everything will work there), but now hibernate does not recognize the connection class.

Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.connection.C3P0ConnectionProvider] as strategy [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]

Help kind people, maybe there is another way to probe the database or c3p0 has separate methods for this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question