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 voidconfigure(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistryImplementor)voiddestroy()ConnectiongetConnection()Returns a database connection.org.hibernate.engine.jdbc.connections.spi.ConnectionProvidergetConnectionProvider(DataSource dataSource)Get aConnectionProviderfor the givenDataSource.
-
-
-
Method Detail
-
getConnectionProvider
@Nonnull public org.hibernate.engine.jdbc.connections.spi.ConnectionProvider getConnectionProvider(@Nullable DataSource dataSource)Description copied from interface:ConnectionProviderSupplierGet aConnectionProviderfor the givenDataSource.- Specified by:
getConnectionProviderin interfaceConnectionProviderSupplier
-
configure
public void configure(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistryImplementor)
- Specified by:
configurein interfaceConfigurableConnectionProviderSupplier
-
getConnection
public Connection getConnection()
Description copied from interface:DatabaseConnectionProviderReturns a database connection. Caller should handle the closing of the connections.- Specified by:
getConnectionin interfaceDatabaseConnectionProvider- Returns:
- database connection
-
-