# Classes that pertain to resource managers

Derby provides two embedded variants of each DataSource interface defined by the JDBC API.

Most applications will use the first variant. However, applications that were coded to run on Java SE 8 Compact Profile 2 may use the second variant (the one whose class name begins with "Basic"). The Compact Profile 2 classes are maintained for backward compatibility.

The Derby 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.

Parent topic: Using Derby as a Java EE resource manager
Related concepts
Getting a DataSource
Shutting down or creating a database