public class BasicDataSourceWithErrorInjection
extends org.apache.commons.dbcp.BasicDataSource
closed, connectionInitSqls, connectionPool, connectionProperties, dataSource, defaultAutoCommit, defaultCatalog, defaultReadOnly, defaultTransactionIsolation, driverClassLoader, driverClassName, initialSize, logWriter, maxActive, maxIdle, maxOpenPreparedStatements, maxWait, minEvictableIdleTimeMillis, minIdle, numTestsPerEvictionRun, password, poolPreparedStatements, testOnBorrow, testOnReturn, testWhileIdle, timeBetweenEvictionRunsMillis, url, username, validationQuery, validationQueryTimeout| Constructor and Description |
|---|
BasicDataSourceWithErrorInjection() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearFailSettings() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
boolean |
isFailAfterBegin() |
boolean |
isFailAfterCommit() |
boolean |
isFailAfterRollback() |
boolean |
isFailBeforeBegin() |
boolean |
isFailBeforeCommit() |
boolean |
isFailBeforeRollback() |
boolean |
isFailOnceOnly() |
void |
setFailAfterBegin(boolean failAfterBegin) |
void |
setFailAfterCommit(boolean failAfterCommit) |
void |
setFailAfterRollback(boolean failAfterRollback) |
void |
setFailBeforeBegin(boolean failBeforeBegin) |
void |
setFailBeforeCommit(boolean failBeforeCommit) |
void |
setFailBeforeRollback(boolean failBeforeRollback) |
void |
setFailOnceOnly(boolean failOnceOnly) |
addConnectionProperty, close, createConnectionFactory, createConnectionPool, createDataSource, createDataSourceInstance, createPoolableConnectionFactory, getConnectionInitSqls, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassLoader, getDriverClassName, getInitialSize, getLogAbandoned, getLoginTimeout, getLogWriter, getMaxActive, getMaxIdle, getMaxOpenPreparedStatements, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getPassword, getRemoveAbandoned, getRemoveAbandonedTimeout, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, getUrl, getUsername, getValidationQuery, getValidationQueryTimeout, isAccessToUnderlyingConnectionAllowed, isClosed, isPoolPreparedStatements, isWrapperFor, log, removeConnectionProperty, setAccessToUnderlyingConnectionAllowed, setConnectionInitSqls, setConnectionProperties, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDriverClassLoader, setDriverClassName, setInitialSize, setLogAbandoned, setLoginTimeout, setLogWriter, setMaxActive, setMaxIdle, setMaxOpenPreparedStatements, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setPassword, setPoolPreparedStatements, setRemoveAbandoned, setRemoveAbandonedTimeout, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUrl, setUsername, setValidationQuery, setValidationQueryTimeout, unwrap, validateConnectionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParentLoggerpublic Connection getConnection() throws SQLException
getConnection in interface DataSourcegetConnection in class org.apache.commons.dbcp.BasicDataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourcegetConnection in class org.apache.commons.dbcp.BasicDataSourceSQLExceptionpublic void clearFailSettings()
public boolean isFailBeforeBegin()
public void setFailBeforeBegin(boolean failBeforeBegin)
failBeforeBegin - the failBeforeBegin to setpublic boolean isFailBeforeCommit()
public void setFailBeforeCommit(boolean failBeforeCommit)
failBeforeCommit - the failBeforeCommit to setpublic boolean isFailBeforeRollback()
public void setFailBeforeRollback(boolean failBeforeRollback)
failBeforeRollback - the failBeforeRollback to setpublic boolean isFailAfterBegin()
public void setFailAfterBegin(boolean failAfterBegin)
failAfterBegin - the failAfterBegin to setpublic boolean isFailAfterCommit()
public void setFailAfterCommit(boolean failAfterCommit)
failAfterCommit - the failAfterCommit to setpublic boolean isFailAfterRollback()
public void setFailAfterRollback(boolean failAfterRollback)
failAfterRollback - the failAfterRollback to setpublic boolean isFailOnceOnly()
public void setFailOnceOnly(boolean failOnceOnly)
failOnceOnly - the failOnceOnly to setCopyright © 2014–2017 Github jjYBdx4IL Projects. All rights reserved.