When to use hibernate.connection.provider_class

When should i use hibernate.connection.provider_class? I got a little confused between it and "hibernate.connection.diver_class".

provider_class may be useful for connection pooling

is there any other purpose where we can use provider_class?

+5
source share
3 answers

Another option for using a connection provider is to support sessions over time, especially with the mysql + hibernate combination. If you do not have a properly configured connection provider that processes timeouts from mysql, you will most likely lose the database connection sooner or later if you have periods of inactivity.

+6

- , , db. - , .

: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html

, . : hibernate.connection.provider_class= org.hibernate.connection.C3P0ConnectionProvider.

+2

All Articles