public class BasicDataSourceWrapper 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 |
---|
BasicDataSourceWrapper() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.commons.dbcp.ConnectionFactory |
createConnectionFactory()
Fixing a bug within
BasicDataSource.createConnectionFactory() for driverClassName to have real effect. |
addConnectionProperty, close, createConnectionPool, createDataSource, createDataSourceInstance, createPoolableConnectionFactory, getConnection, getConnection, 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, validateConnectionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParentLogger
public BasicDataSourceWrapper()
protected org.apache.commons.dbcp.ConnectionFactory createConnectionFactory() throws SQLException
BasicDataSource.createConnectionFactory()
for driverClassName
to have real effect.
Because we use currently Apache Commons DBCP 1.4.0 that has a bug not considering driverClassName
, thus, we're unable
to create a JDBC driver using a user-provided driver class name (we try to do that by setting explicitly a value for
openJpa.connectionProperties="DriverClassName=..."
), unless we perform the exact same fix that is applied by the DBCP
patch.
Note: when DBCP 1.4.1 will be released, and Oozie will update to 1.4.1, we can remove this class.
Please see the DBCP bug and the fixed method for details.
Please also see how OpenJPA is integrated with DBCP.
createConnectionFactory
in class org.apache.commons.dbcp.BasicDataSource
SQLException
Copyright © 2018 Apache Software Foundation. All rights reserved.