Data Source Classes

Attention: Derby Version 10.2 includes JDBC 4.0 functionality based on a pre-release of Java SE 6. When you use Derby with a Java SE 6 virtual machine, Derby will use its JDBC 3.0 drivers, just as with 1.4 and 1.5 virtual machines. JDBC 4.0 is available only to developers who download Java SE 6 and use it to build in support for JDBC 4.0. The Release Notes explain how to build the JDBC 4.0 functionality with Derby Version 10.2. A follow-on Derby release will include JDBC 4.0 functionality based on the final JDBC 4.0 specification once Java SE 6 becomes generally available.

These classes are all related to Derby's implementation of javax.sql.DataSource and related APIs. For more information, see the Derby Developer's Guide.

Each of these classes has two variants. Use the first variant if your application runs on JDK 1.5 or lower. Use the second variant (the one ending in "40") if your application runs on JDK 1.6 or higher.

Embedded environment:
  • org.apache.derby.jdbc.EmbeddedDataSource and org.apache.derby.jdbc.EmbeddedDataSource40
  • org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource and org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40
  • org.apache.derby.jdbc.EmbeddedXADataSource and org.apache.derby.jdbc.EmbeddedXADataSource40
Client-server environment
  • org.apache.derby.jdbc.ClientDataSource and org.apache.derby.jdbc.ClientDataSource40
  • org.apache.derby.jdbc.ClientConnectionPoolDataSource and org.apache.derby.jdbc.ClientConnectionPoolDataSource40
  • org.apache.derby.jdbc.ClientXADataSource and org.apache.derby.jdbc.ClientXADataSource40
Related reference
JDBC driver