MultiTenantConnectionProvider based on DataSources.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Connection | getAnyConnection()
Implements org. |
| public Connection | getConnection(String
The identifier of the tenant for which to get a connection tenantIdentifier)Implements org. |
| public boolean | isUnwrappableAs(Class<T>
The type to check. unwrapType)Implements org. |
| public void | releaseAnyConnection(Connection
The JDBC connection to release connection)Implements org. getAnyConnection
|
| public void | releaseConnection(String
The identifier of the tenant. tenantIdentifier, Connection The JDBC connection to release connection)Implements org. |
| protected abstract DataSource | |
| protected abstract DataSource | |
| public boolean | supportsAggressiveRelease()
Implements org. |
| public <T> T | unwrap(Class<T>
The java type as which to unwrap this instance. unwrapType)Implements org. |
| AbstractDataSourceBasedMultiTenantConnectionProviderImpl | back to summary |
|---|---|
| public AbstractDataSourceBasedMultiTenantConnectionProviderImpl() | |
| getAnyConnection | back to summary |
|---|---|
| public Connection getAnyConnection() throws SQLException Implements org. Doc from org. Allows access to the database metadata of the underlying database(s) in situations where we do not have a tenant id (like startup processing, for example).
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection(String tenantIdentifier) throws SQLException Implements org. Doc from org. Obtains a connection for Hibernate use according to the underlying strategy of this provider.
| |
| isUnwrappableAs | back to summary |
|---|---|
| public boolean isUnwrappableAs(Class<T> unwrapType) Implements org. Doc from org. Can this wrapped service be unwrapped as the indicated type? | |
| releaseAnyConnection | back to summary |
|---|---|
| public void releaseAnyConnection(Connection connection) throws SQLException Implements org. Doc from org. Release a connection obtained from
| |
| releaseConnection | back to summary |
|---|---|
| public void releaseConnection(String tenantIdentifier, Connection connection) throws SQLException Implements org. Doc from org. Release a connection from Hibernate use.
| |
| selectAnyDataSource | back to summary |
|---|---|
| protected abstract DataSource selectAnyDataSource() | |
| selectDataSource | back to summary |
|---|---|
| protected abstract DataSource selectDataSource(String tenantIdentifier) | |
| supportsAggressiveRelease | back to summary |
|---|---|
| public boolean supportsAggressiveRelease() Implements org. Doc from org. Does this connection provider support aggressive release of JDBC connections and re-acquisition of those connections (if need be) later?
This is used in conjunction with Typically, this is only true in managed environments where a container tracks connections by transaction or thread. Note that JTA semantic depends on the fact that the underlying connection provider does support aggressive release.
| |
| unwrap | back to summary |
|---|---|
| public <T> T unwrap(Class<T> unwrapType) Implements org. Doc from org. Unproxy the service proxy
| |