Using Embedded JDBC Drivers

Every Apache Derby embedded application must load the JDBC driver before issuing any connects or SQL statements. Stored procedures and user-defined functions do not need to load the JDBC driver because it is assumed that they are running under the context of another program that is executing an SQL statement.

By definition, an embedded Apache Derby application has a direct connection to the database. When the application starts, it is the only connection to the database, and when the application completes, the database is stopped. The other option is to run Apache Derby as a network database. In this case, the program can be one of many applications that are accessing the database.

The class that loads the Apache Derby ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.