public interface BasicDataSource extends DataSource, Closeable
DataSource implementation, using the DriverManager class and returning
a new Connection from every getConnection call.
This DataSource is configured using standard connection properties and provides a fluent builder with methods to set base connection parameters, such as JDBC connection URL, username, password and a specific JDBC Driver. If no specific Driver class is configured, the JDBC DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
The DataSource is Closeable only for API consistency with other DataSource implementations, but the
close() method does nothing by now.
NOTE: This DataSource does not pool Connections. Can be useful for test or standalone environments outside J2EE containers.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BasicDataSource.Builder
BasicDataSource builder. |
| Modifier and Type | Method and Description |
|---|---|
static BasicDataSource.Builder |
builder()
Get a builder to create and configure a
BasicDataSource. |
getConnection, getConnectiongetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterisWrapperFor, unwrapstatic BasicDataSource.Builder builder()
BasicDataSource.Copyright © 2019 The Holon Platform. All rights reserved.