Package com.axelor.db.tenants
Class TenantConnectionProvider
- java.lang.Object
-
- org.hibernate.engine.jdbc.connections.spi.AbstractDataSourceBasedMultiTenantConnectionProviderImpl
-
- com.axelor.db.tenants.TenantConnectionProvider
-
- All Implemented Interfaces:
Serializable
,MultiTenantConnectionProvider
,Service
,ServiceRegistryAwareService
,Stoppable
,Wrapped
public class TenantConnectionProvider extends AbstractDataSourceBasedMultiTenantConnectionProviderImpl implements ServiceRegistryAwareService, Stoppable
The tenant connection provider.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TenantConnectionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
injectServices(ServiceRegistryImplementor serviceRegistry)
protected DataSource
selectAnyDataSource()
protected DataSource
selectDataSource(String tenantIdentifier)
void
stop()
-
Methods inherited from class org.hibernate.engine.jdbc.connections.spi.AbstractDataSourceBasedMultiTenantConnectionProviderImpl
getAnyConnection, getConnection, isUnwrappableAs, releaseAnyConnection, releaseConnection, supportsAggressiveRelease, unwrap
-
-
-
-
Method Detail
-
selectAnyDataSource
protected final DataSource selectAnyDataSource()
- Specified by:
selectAnyDataSource
in classAbstractDataSourceBasedMultiTenantConnectionProviderImpl
-
selectDataSource
protected final DataSource selectDataSource(String tenantIdentifier)
- Specified by:
selectDataSource
in classAbstractDataSourceBasedMultiTenantConnectionProviderImpl
-
injectServices
public void injectServices(ServiceRegistryImplementor serviceRegistry)
- Specified by:
injectServices
in interfaceServiceRegistryAwareService
-
-