public final class

ConnectionProviderFactory

extends Object
java.lang.Object
   ↳ org.hibernate.connection.ConnectionProviderFactory

Class Overview

Instantiates a connection provider given either System properties or a java.util.Properties instance. The ConnectionProviderFactory first attempts to find a name of a ConnectionProvider subclass in the property hibernate.connection.provider_class. If missing, heuristics are used to choose either DriverManagerConnectionProvider, DatasourceConnectionProvider, C3P0ConnectionProvider or DBCPConnectionProvider.

Summary

Public Methods
static Properties getConnectionProperties(Properties properties)
Transform JDBC connection properties.
static ConnectionProvider newConnectionProvider(Properties properties)
Instantiate a ConnectionProvider using given properties.
static ConnectionProvider newConnectionProvider()
Instantiate a ConnectionProvider using System properties.
static ConnectionProvider newConnectionProvider(Properties properties, Map connectionProviderInjectionData)
Create a connection provider based on the given information.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Properties getConnectionProperties (Properties properties)

Transform JDBC connection properties. Passed in the form hibernate.connection.* to the format accepted by DriverManager by trimming the leading "hibernate.connection".

public static ConnectionProvider newConnectionProvider (Properties properties)

Instantiate a ConnectionProvider using given properties. Method newConnectionProvider.

Parameters
properties hibernate SessionFactory properties
Returns
  • ConnectionProvider

public static ConnectionProvider newConnectionProvider ()

Instantiate a ConnectionProvider using System properties.

Returns
  • The created connection provider.

public static ConnectionProvider newConnectionProvider (Properties properties, Map connectionProviderInjectionData)

Create a connection provider based on the given information.

Parameters
properties Properties being used to build the SessionFactory.
connectionProviderInjectionData Something to be injected in the connection provided
Returns
  • The created connection provider