Package com.d3x.core.db
Class DataSourceAdapter.Apache
- java.lang.Object
-
- com.d3x.core.db.DataSourceAdapter.Apache
-
- All Implemented Interfaces:
DataSourceAdapter
- Enclosing interface:
- DataSourceAdapter
public static class DataSourceAdapter.Apache extends java.lang.Object implements DataSourceAdapter
A DataSourceFactory that uses Apache Commons DBCP library
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.d3x.core.db.DataSourceAdapter
DataSourceAdapter.Apache
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description Apache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(javax.sql.DataSource source)Closes the data source if appropriatejavax.sql.DataSourcecreate(DatabaseConfig config)Returns a newly created DataSource based on the config provided
-
-
-
Method Detail
-
create
public javax.sql.DataSource create(DatabaseConfig config) throws DatabaseException
Description copied from interface:DataSourceAdapterReturns a newly created DataSource based on the config provided- Specified by:
createin interfaceDataSourceAdapter- Parameters:
config- the database configuration- Returns:
- the newly created DataSource
- Throws:
DatabaseException- if operation fails
-
close
public void close(javax.sql.DataSource source)
Description copied from interface:DataSourceAdapterCloses the data source if appropriate- Specified by:
closein interfaceDataSourceAdapter- Parameters:
source- the data source
-
-