Derby provides two embedded variants of each DataSource interface defined by the JDBC API.
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 Derby Reference Manual.
The Derby implementation classes for the DataSource interfaces are as follows:
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.
These classes implement the javax.sql.ConnectionPoolDataSource interface and provide a factory for PooledConnection objects.
These classes implement the javax.sql.XADataSource interface.
For more information, see the API documentation for each class.