Class TenantRoutingDataSource

java.lang.Object
org.springframework.jdbc.datasource.AbstractDataSource
org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
org.alfresco.repo.tenant.TenantRoutingDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource, org.springframework.beans.factory.InitializingBean

public class TenantRoutingDataSource extends org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
Experimental
Since:
4.2
Author:
janv
  • Constructor Details

    • TenantRoutingDataSource

      public TenantRoutingDataSource()
  • Method Details

    • setTenantService

      public void setTenantService(TenantService tenantService)
    • setBaseDataSource

      public void setBaseDataSource(org.apache.commons.dbcp2.BasicDataSource baseDataSource)
    • determineCurrentLookupKey

      protected Object determineCurrentLookupKey()
      Specified by:
      determineCurrentLookupKey in class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
    • addTenantDataSource

      public void addTenantDataSource(String tenantDomain, String dbUrl) throws SQLException
      Throws:
      SQLException
    • removeTenantDataSource

      public void removeTenantDataSource(String tenantDomain) throws SQLException
      Throws:
      SQLException