Package de.hybris.platform.jdbcwrapper
Class SlaveTenantDataSource
- java.lang.Object
-
- de.hybris.platform.jdbcwrapper.DataSourceImpl
-
- de.hybris.platform.jdbcwrapper.SlaveTenantDataSource
-
- All Implemented Interfaces:
HybrisDataSource
,java.sql.Wrapper
,javax.sql.CommonDataSource
,javax.sql.DataSource
public class SlaveTenantDataSource extends DataSourceImpl
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.jdbcwrapper.DataSourceImpl
OBJ_POOL_V1_WHEN_EXHAUSTED_BLOCK, OBJ_POOL_V1_WHEN_EXHAUSTED_FAIL, OBJ_POOL_V1_WHEN_EXHAUSTED_GROW
-
-
Constructor Summary
Constructors Constructor Description SlaveTenantDataSource(Tenant tenant, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> connectionParams, boolean readOnly, SlaveTenantDataSourceFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
getConnection(boolean transactionBound)
Fetches a new connection from connection pool.-
Methods inherited from class de.hybris.platform.jdbcwrapper.DataSourceImpl
cannotConnect, createNewPoolConfig, createPoolConfig, destroy, determineBlockingFromV1Property, doGetConnection, getConnection, getConnection, getConnectionParameters, getConnectionPool, getCustomSessionSQL, getDatabaseName, getDatabaseURL, getDatabaseUser, getDatabaseVersion, getDataSourceFactory, getDriverVersion, getID, getJDBCInterceptor, getJNDIName, getLoginTimeout, getLogUtils, getLogWriter, getMaxAllowedPhysicalOpen, getMaxInUse, getMaxPhysicalOpen, getMaxPreparedParameterCount, getMillisWaitedForConnection, getNumInUse, getNumPhysicalOpen, getParentLogger, getSchemaName, getTablePrefix, getTenant, getUserNameFromDatabaseMetaData, invalidate, isDBLogActive, isDBLogAppendStackTraceActive, isReadOnly, isWrapperFor, readSchemaName, resetStats, returnToPool, setDBLog, setDBLogAppendStackTrace, setLoginTimeout, setLogWriter, toString, totalGets, translateToDataAccessException, unwrap
-
-
-
-
Constructor Detail
-
SlaveTenantDataSource
public SlaveTenantDataSource(Tenant tenant, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> connectionParams, boolean readOnly, SlaveTenantDataSourceFactory factory)
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection(boolean transactionBound) throws java.sql.SQLException
Description copied from class:DataSourceImpl
Fetches a new connection from connection pool. If aTransaction
is currently running the connection is either transaction bound (the connection which BEGIN and COMMIT/ROLLBACK is called upon) or a 'fresh' one.- Specified by:
getConnection
in interfaceHybrisDataSource
- Overrides:
getConnection
in classDataSourceImpl
- Parameters:
transactionBound
- only valid if transaction is currently running: if true connection is transaction bound, if false a 'fresh' one is returned- Throws:
java.sql.SQLException
-
-