Interface ConnectionProvider

All Known Subinterfaces:
DatabaseConnectionProvider
All Known Implementing Classes:
GenericConnectionProvider, GenericConnectionProviderOnePoolPerTenant, HanaConnectionProvider, SchemalessConnectionProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ConnectionProvider
Functional Interface for a function that returns a DB connection for a tenant
  • Method Details

    • getConnection

      Connection getConnection(String tenantId, DataSourceAndInfo dataSourceAndInfo, DataSourceInfo libContainerInfo) throws SQLException
      Request a connection for a tenant.
      Parameters:
      tenantId - Identifier of tenant for whom a connection is requested.
      dataSourceAndInfo - Connection pool instance responsible for the tenant as datasource and tenant credentials as info. In case mode combinePools is used, one connection pool per DB is created using credentials issued to a technical user. In this case the credentials used by the pool are different from the tenant-credentials provided in the info part of this parameter.
      libContainerInfo - Credentials of technical user used in mode combine pools.
      Returns:
      Throws:
      SQLException