Classes that pertain to resource managers provides two embedded variants of each DataSource interface defined by the JDBC API. EmbeddedDataSource BasicEmbeddedDataSource40 EmbeddedConnectionPoolDataSource BasicEmbeddedConnectionPoolDataSource40 EmbeddedXADataSource BasicEmbeddedXADataSource40

Most applications will use the first variant. However, applications that run on Java SE 8 Compact Profile 2 must use the second variant (the one whose class name begins with "Basic"). For more information, see "JDBC support for Java SE 8 Compact Profiles" in the .

The implementation classes for the DataSource interfaces are as follows:

  • org.apache.derby.jdbc.EmbeddedDataSource and org.apache.derby.jdbc.BasicEmbeddedDataSource40

    These classes implement the javax.sql.DataSource interface, which a JNDI server can reference (except in the case of the second variant). Typically, this is the object that you work with as a DataSource.

  • org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource and org.apache.derby.jdbc.BasicEmbeddedConnectionPoolDataSource40

    These classes implement the javax.sql.ConnectionPoolDataSource interface and provide a factory for PooledConnection objects.

  • org.apache.derby.jdbc.EmbeddedXADataSource and org.apache.derby.jdbc.BasicEmbeddedXADataSource40

    These classes implement the javax.sql.XADataSource interface.

For more information, see the API documentation for each class.