Class TenantAwareDataSource
- java.lang.Object
-
- org.activiti.engine.impl.cfg.multitenant.TenantAwareDataSource
-
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
@Deprecated public class TenantAwareDataSource extends Object implements DataSource
Deprecated.multi-tenant code will be removed in future version of Activiti and Activiti CloudADataSourceimplementation that switches the currently used datasource based on the current values of theTenantInfoHolder. When aConnectionis requested from thisDataSource, the correctDataSourcefor the current tenant will be determined and used. Heavily influenced and inspired by Spring's AbstractRoutingDataSource.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Object,DataSource>dataSourcesDeprecated.protected TenantInfoHoldertenantInfoHolderDeprecated.
-
Constructor Summary
Constructors Constructor Description TenantAwareDataSource(TenantInfoHolder tenantInfoHolder)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDataSource(Object key, DataSource dataSource)Deprecated.ConnectiongetConnection()Deprecated.ConnectiongetConnection(String username, String password)Deprecated.protected DataSourcegetCurrentDataSource()Deprecated.Map<Object,DataSource>getDataSources()Deprecated.intgetLoginTimeout()Deprecated.PrintWritergetLogWriter()Deprecated.LoggergetParentLogger()Deprecated.booleanisWrapperFor(Class<?> iface)Deprecated.voidremoveDataSource(Object key)Deprecated.voidsetDataSources(Map<Object,DataSource> dataSources)Deprecated.voidsetLoginTimeout(int seconds)Deprecated.voidsetLogWriter(PrintWriter out)Deprecated.<T> Tunwrap(Class<T> iface)Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Field Detail
-
tenantInfoHolder
protected TenantInfoHolder tenantInfoHolder
Deprecated.
-
dataSources
protected Map<Object,DataSource> dataSources
Deprecated.
-
-
Constructor Detail
-
TenantAwareDataSource
public TenantAwareDataSource(TenantInfoHolder tenantInfoHolder)
Deprecated.
-
-
Method Detail
-
addDataSource
public void addDataSource(Object key, DataSource dataSource)
Deprecated.
-
removeDataSource
public void removeDataSource(Object key)
Deprecated.
-
getConnection
public Connection getConnection() throws SQLException
Deprecated.- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
public Connection getConnection(String username, String password) throws SQLException
Deprecated.- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getCurrentDataSource
protected DataSource getCurrentDataSource()
Deprecated.
-
getLoginTimeout
public int getLoginTimeout() throws SQLExceptionDeprecated.- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
Deprecated.- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
Deprecated.- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
Deprecated.- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getDataSources
public Map<Object,DataSource> getDataSources()
Deprecated.
-
setDataSources
public void setDataSources(Map<Object,DataSource> dataSources)
Deprecated.
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
Deprecated.- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
Deprecated.- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLExceptionDeprecated.- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
-