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 Connection object
  • connection which can be used in connection pooling
  • connection which can be used in distributed transactions and connection pooling

Subpages

Resources