A DataSource is a factory for connections to any physical data source. An alternative to the DriverManager facility. It uses a URL along with some credentials to establish a database connection.
An object that implements the javax.sql.DataSource interface will typically be registered with JNDI service and can be discovered using it’s JNDI name.
A datasource may be used to obtain:
- standard
Connectionobject - connection which can be used in connection pooling
- connection which can be used in distributed transactions and connection pooling
Subpages
- Java - Connection Pooling Frameworks
- Java - DataSource Configuration
- Java - DataSource configuring for Tests
- Java - Spring - Multiple DataSources