Package org.apache.openjpa.jdbc.schema
Class DBCPDriverDataSource
java.lang.Object
org.apache.openjpa.jdbc.schema.SimpleDriverDataSource
org.apache.openjpa.jdbc.schema.DBCPDriverDataSource
- All Implemented Interfaces:
- Wrapper,- CommonDataSource,- DataSource,- DriverDataSource,- Configurable,- Closeable
- Direct Known Subclasses:
- AutoDriverDataSource
Commons DBCP basic pooling driver data source.
 The commons-dbcp packages must be on the class path for this plugin to work,
 as it WILL NOT fall back to non-DBCP mode if they are missing. For automatic
 usage of Commons DBCP when available, use AutoDriverDataSource instead.
- 
Field SummaryFieldsFields inherited from class org.apache.openjpa.jdbc.schema.SimpleDriverDataSource_eloc, _loc
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidInvoked upon completion of bean property configuration for this object.getConnection(Properties props) protected ConnectiongetDBCPConnection(Properties props) protected DataSourcegetDBCPDataSource(Properties props) protected booleanThis method should not throw an exception, as it is called by AutoDriverDataSource to determine if user already specified to use Commons DBCP.protected static booleanThis method should not throw an exception, as it is called by AutoDriverDataSource to determine if it should use DBCP or not based on if org.apache.commons.dbcp2.BasicDataSource can be loaded.voidInvoked prior to setting bean properties.voidInvoked before bean property configuration is begun on this object.Methods inherited from class org.apache.openjpa.jdbc.schema.SimpleDriverDataSourcecreateConnectionDecorators, getClassLoader, getConnection, getConnection, getConnectionDriverName, getConnectionFactoryProperties, getConnectionPassword, getConnectionProperties, getConnectionURL, getConnectionUserName, getLoginTimeout, getLogWriter, getParentLogger, getSimpleConnection, getSimpleDriver, initDBDictionary, isWrapperFor, setClassLoader, setConnectionDriverName, setConnectionFactoryProperties, setConnectionPassword, setConnectionProperties, setConnectionURL, setConnectionUserName, setLoginTimeout, setLogWriter, unwrapMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSourcecreateShardingKeyBuilderMethods inherited from interface javax.sql.DataSourcecreateConnectionBuilder
- 
Field Details- 
conf
 
- 
- 
Constructor Details- 
DBCPDriverDataSourcepublic DBCPDriverDataSource()
 
- 
- 
Method Details- 
getConnection- Overrides:
- getConnectionin class- SimpleDriverDataSource
- Throws:
- SQLException
 
- 
close- Specified by:
- closein interface- Closeable
- Throws:
- SQLException
 
- 
getDBCPConnection- Throws:
- SQLException
 
- 
getDBCPDataSource
- 
isDBCPDataSourceprotected boolean isDBCPDataSource()This method should not throw an exception, as it is called by AutoDriverDataSource to determine if user already specified to use Commons DBCP.- Returns:
- true if ConnectionDriverName contains org.apache.commons.dbcp2, otherwise false
 
- 
isDBCPLoadedThis method should not throw an exception, as it is called by AutoDriverDataSource to determine if it should use DBCP or not based on if org.apache.commons.dbcp2.BasicDataSource can be loaded.- Returns:
- true if Commons DBCP was found on the classpath, otherwise false
 
- 
setConfigurationDescription copied from interface:ConfigurableInvoked prior to setting bean properties.- Specified by:
- setConfigurationin interface- Configurable
 
- 
startConfigurationpublic void startConfiguration()Description copied from interface:ConfigurableInvoked before bean property configuration is begun on this object.- Specified by:
- startConfigurationin interface- Configurable
 
- 
endConfigurationpublic void endConfiguration()Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
- endConfigurationin interface- Configurable
 
 
-