Class TenantAwareDataSource

java.lang.Object
org.flowable.common.engine.impl.cfg.multitenant.TenantAwareDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource

public class TenantAwareDataSource extends Object implements DataSource
A DataSource implementation that switches the currently used datasource based on the current values of the TenantInfoHolder. When a Connection is requested from this DataSource, the correct DataSource for the current tenant will be determined and used. Heavily influenced and inspired by Spring's AbstractRoutingDataSource.
Author:
Joram Barrez