org.hibernate.connection
Class ConnectionProviderFactory
java.lang.Object
org.hibernate.connection.ConnectionProviderFactory
public final class ConnectionProviderFactory
extends java.lang.Object
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.
getConnectionProperties
public static Properties getConnectionProperties(Properties properties)
Transform JDBC connection properties.
Passed in the form hibernate.connection.* to the
format accepted by DriverManager by triming the leading "hibernate.connection".
newConnectionProvider
public static ConnectionProvider newConnectionProvider()
throws HibernateException
Instantiate a ConnectionProvider using System properties.
- The created connection provider.
newConnectionProvider
public static ConnectionProvider newConnectionProvider(Properties properties)
throws HibernateException
Instantiate a ConnectionProvider using given properties.
Method newConnectionProvider.
properties
- hibernate SessionFactory properties
newConnectionProvider
public static ConnectionProvider newConnectionProvider(Properties properties,
Map connectionProviderInjectionData)
throws HibernateException
Create a connection provider based on the given information.
properties
- Properties being used to build the SessionFactory
.connectionProviderInjectionData
- Soemthing to be injected in the conenction provided
- The created connection provider