This section documents the JDBC interfaces that Derby implements for Java EE compliance.
An interface that is a factory for connections to the physical data source that the object represents. An object that implements the DataSource interface will typically be registered with a naming service based on the Java Naming and Directory (JNDI) API. The org.apache.derby.jdbc DataSource classes support the JNDI API, with the exception of the DataSource classes that support Java SE 8 Compact Profiles 2 and 3. See javax.sql.DataSource interface: JDBC 3 and JDBC 4.0 features, javax.sql.DataSource interface: JDBC 4.1 features, and JDBC support for Java SE 8 Compact Profiles for more information.
Establishing a connection to the database can be a relatively expensive operation in client/server environments. Establishing the connection once and then using the same connection for multiple requests can dramatically improve the performance of a database.
The Derby implementation of ConnectionPoolDataSource and PooledConnection interfaces allows a connection pool server to maintain a set of such connections to the resource manager (Derby). In an embedded environment, connections are much cheaper and connection pooling is not necessary.
An XAConnection produces an XAResource, and, over its lifetime, many Connections. This type of connection allows for distributed transactions.
An XADataSource is simply a ConnectionPoolDataSource that produces XAConnections.
Sets a property to create a database at the next connection. The string argument must be "create".
Sets a property to shut down a database. Shuts down the database at the next connection. The string argument must be "shutdown".