Class DefaultConnectionProviderSupplier
- java.lang.Object
-
- com.atlassian.confluence.impl.core.persistence.hibernate.DefaultConnectionProviderSupplier
-
- All Implemented Interfaces:
ConfigurableConnectionProviderSupplier
,ConnectionProviderSupplier
,DatabaseConnectionProvider
public class DefaultConnectionProviderSupplier extends Object implements ConfigurableConnectionProviderSupplier
This class provides the ConnectionProvider that's shared by all SessionFactory objects in Confluence.- Since:
- 6.10.0
-
-
Constructor Summary
Constructors Constructor Description DefaultConnectionProviderSupplier(com.atlassian.config.db.HibernateConfig hibernateConfig, io.micrometer.core.instrument.MeterRegistry micrometerRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistryImplementor)
void
destroy()
Connection
getConnection()
Returns a database connection.org.hibernate.engine.jdbc.connections.spi.ConnectionProvider
getConnectionProvider(DataSource dataSource)
Get aConnectionProvider
for the givenDataSource
.
-
-
-
Method Detail
-
getConnectionProvider
@Nonnull public org.hibernate.engine.jdbc.connections.spi.ConnectionProvider getConnectionProvider(@Nullable DataSource dataSource)
Description copied from interface:ConnectionProviderSupplier
Get aConnectionProvider
for the givenDataSource
.- Specified by:
getConnectionProvider
in interfaceConnectionProviderSupplier
-
configure
public void configure(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistryImplementor)
- Specified by:
configure
in interfaceConfigurableConnectionProviderSupplier
-
getConnection
public Connection getConnection()
Description copied from interface:DatabaseConnectionProvider
Returns a database connection. Caller should handle the closing of the connections.- Specified by:
getConnection
in interfaceDatabaseConnectionProvider
- Returns:
- database connection
-
-