Derby Data Source

This article includes information about how to install the JavaDB/Apache Derby JDBC driver and how to connect to a Derby database. With the JDBC driver installed, the JavaDB/Apache Derby data source is available as an option in the connection wizard when creating an API.
This article includes information about how to install the JavaDB/Apache Derby JDBC driver and how to connect to a Derby database. With the JDBC driver installed, the
JavaDB/Apache Derby
data source is available as an option in the connection wizard when creating an API.
In this article:
Install the JavaDB/Apache Derby JDBC Driver
The self-contained, single-user version of
Layer7 Live API Creator
that is based on Jetty includes the JavaDB/Apache Derby JDBC driver. The JDBC driver is located in the
%JETTY_HOME%/caliveapicreator/lib/ext
directory. If you have installed this version of
Layer7 Live API Creator
, no additional steps are required to install the JDBC driver.
If you have installed
Layer7 Live API Creator
on another Java container, such as Tomcat, copy the
derby-<version>.jar
JAR file (the JDBC driver) into the directory that is based on the Java container on which you have installed
Layer7 Live API Creator
:
Apache Tomcat
Copy the JDBC driver into the
%{CATALINA_HOME}/lib
directory
Oracle WebLogic
Copy the JDBC driver to the
<Your WebLogic Domain Directory>/lib
directory.
JBoss/WildFly
For more information, see Install on JBoss.
IBM WebSphere
Add the JDBC driver to your Web application server.
Using the WebSphere administrative console, create a JDBC provider for the driver in the server.
For more information about how to create a JDBC provider, see the IBM WebSphere documentation.
For more information about the JDBC driver versions that
Layer7 Live API Creator
supports, see Installation Requirements and Supported Platforms.
Connect to a Derby Database
You can connect to your Derby database using the following methods:
  • (If you have not created your API yet) When you create your API.
    For more information about how to create an API, see Creating APIs.
  • (If you have an existing API) By adding a connection to a Derby data source.
    For more information about how to add a connection to a data source, see Database Connectivity.
The following procedure details how to connect to your Derby database when creating your API.
Follow these steps:
  1. In API Creator, on the APIs page, click
    Create New API
    .
  2. The connection wizard opens.
  3. Click
    Database First
    as the approach that you want to use to create your API.
  4. Select
    Derby/JavaDB
    as the data source.
  5. Complete the following fields, and then click
    Continue
    :
    URL
    Enter the folder location. For example:
    jdbc:derby:directory:/Users/jdoe/lac/api-projects/Market/MarketDB;
    create=true
    Schema
    Enter the name of the schema.
    Username
    Enter the username used to connect to the schema
    Password
    Enter the password for the username used to connect to the schema.
The API is created. You are connected to the Derby database.
Next Steps
Now that you have connected to your Derby database, you can do the following:
  • Allow users with the appropriate credentials to edit the schema for this database.
    For more information about how to allow users to edit the schema for databases, see Database Connectivity.
  • Create your schema.
    You can create your schema using one of the following methods: