public class ConnectionProviderInitiator extends Object implements StandardServiceInitiator<ConnectionProvider>
ConnectionProvider
.Modifier and Type | Field and Description |
---|---|
static String |
C3P0_STRATEGY
The strategy for c3p0 connection pooling
|
static String |
HIKARI_STRATEGY
The strategy for proxool connection pooling
|
static String |
INJECTION_DATA
No idea.
|
static ConnectionProviderInitiator |
INSTANCE
Singleton access
|
static String |
PROXOOL_STRATEGY
The strategy for proxool connection pooling
|
Constructor and Description |
---|
ConnectionProviderInitiator() |
Modifier and Type | Method and Description |
---|---|
static Integer |
extractIsolation(Map settings) |
static Properties |
getConnectionProperties(Map<?,?> properties)
Build the connection properties capable of being passed to the
DriverManager.getConnection(java.lang.String, java.util.Properties)
forms taking Properties argument. |
Class<ConnectionProvider> |
getServiceInitiated()
Obtains the service role initiated by this initiator.
|
ConnectionProvider |
initiateService(Map configurationValues,
ServiceRegistryImplementor registry)
Initiates the managed service.
|
static Integer |
interpretIsolation(Object setting) |
static String |
toIsolationConnectionConstantName(Integer isolation)
Gets the
Connection constant name corresponding to the given isolation. |
static String |
toIsolationNiceName(Integer isolation)
Get the name of a JDBC transaction isolation level
|
public static final ConnectionProviderInitiator INSTANCE
public static final String C3P0_STRATEGY
public static final String PROXOOL_STRATEGY
public static final String HIKARI_STRATEGY
public static final String INJECTION_DATA
public Class<ConnectionProvider> getServiceInitiated()
ServiceInitiator
getServiceInitiated
in interface ServiceInitiator<ConnectionProvider>
public ConnectionProvider initiateService(Map configurationValues, ServiceRegistryImplementor registry)
StandardServiceInitiator
initiateService
in interface StandardServiceInitiator<ConnectionProvider>
configurationValues
- The configuration values in effectregistry
- The service registry. Can be used to locate services needed to fulfill initiation.public static Properties getConnectionProperties(Map<?,?> properties)
DriverManager.getConnection(java.lang.String, java.util.Properties)
forms taking Properties
argument. We seek out all keys in the passed map which start with
hibernate.connection.
, using them to create a new Properties
instance. The keys in this
new Properties
have the hibernate.connection.
prefix trimmed.properties
- The map from which to build the connection specific properties.public static String toIsolationConnectionConstantName(Integer isolation)
Connection
constant name corresponding to the given isolation.isolation
- The transaction isolation numeric value.HibernateException
- If the given isolation does not map to JDBC standard isolationtoIsolationNiceName(java.lang.Integer)
public static String toIsolationNiceName(Integer isolation)
isolation
- The transaction isolation numeric value.toIsolationConnectionConstantName(java.lang.Integer)
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.