public class ConnectionProviderInitiator extends java.lang.Object implements StandardServiceInitiator<ConnectionProvider>
ConnectionProvider.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
C3P0_STRATEGY
The strategy for c3p0 connection pooling
|
static java.lang.String |
HIKARI_STRATEGY
The strategy for proxool connection pooling
|
static java.lang.String |
INJECTION_DATA
No idea.
|
static ConnectionProviderInitiator |
INSTANCE
Singleton access
|
static java.lang.String |
PROXOOL_STRATEGY
The strategy for proxool connection pooling
|
| Constructor and Description |
|---|
ConnectionProviderInitiator() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Integer |
extractIsolation(java.util.Map settings) |
static java.util.Properties |
getConnectionProperties(java.util.Map<?,?> properties)
Build the connection properties capable of being passed to the
DriverManager.getConnection(java.lang.String, java.util.Properties)
forms taking Properties argument. |
java.lang.Class<ConnectionProvider> |
getServiceInitiated()
Obtains the service role initiated by this initiator.
|
ConnectionProvider |
initiateService(java.util.Map configurationValues,
ServiceRegistryImplementor registry)
Initiates the managed service.
|
static java.lang.Integer |
interpretIsolation(java.lang.Object setting) |
static java.lang.String |
toIsolationConnectionConstantName(java.lang.Integer isolation)
Gets the
Connection constant name corresponding to the given isolation. |
static java.lang.String |
toIsolationNiceName(java.lang.Integer isolation)
Get the name of a JDBC transaction isolation level
|
public static final ConnectionProviderInitiator INSTANCE
public static final java.lang.String C3P0_STRATEGY
public static final java.lang.String PROXOOL_STRATEGY
public static final java.lang.String HIKARI_STRATEGY
public static final java.lang.String INJECTION_DATA
public java.lang.Class<ConnectionProvider> getServiceInitiated()
ServiceInitiatorgetServiceInitiated in interface ServiceInitiator<ConnectionProvider>public ConnectionProvider initiateService(java.util.Map configurationValues, ServiceRegistryImplementor registry)
StandardServiceInitiatorinitiateService 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 java.util.Properties getConnectionProperties(java.util.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 java.lang.Integer extractIsolation(java.util.Map settings)
public static java.lang.Integer interpretIsolation(java.lang.Object setting)
public static java.lang.String toIsolationConnectionConstantName(java.lang.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 java.lang.String toIsolationNiceName(java.lang.Integer isolation)
isolation - The transaction isolation numeric value.toIsolationConnectionConstantName(java.lang.Integer)Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.