Configure Apache Derby as your Admin Database

(Advanced Users) You can install Live API Creator on Jetty Web server using Apache Derby as your admin database (instead of MySQL).

Limitations: Live API Creator supports Derby only in embedded mode. In this mode, Apache Derby does not support cluster configurations. Only one server can access the database at any given time.

Verify Prerequisites

Ensure that you have completed the following prerequisites:
  • The Derby JAR is in the {CATALINA_HOME}/lib directory.
  • You have configured Jetty. The self-contained, single-user version of Live API Creator is a demonstration package that is based on Jetty. For more information about installing and configuring the demo package, see Install the Single-User Demonstration Package.

Configure Derby

Open the %CATALINA_HOME%/conf/server.xml file, insert the following XML code within the <GlobalNamingResources> tag, save your changes, and close the file:
<Resource accessToUnderlyingConnectionAllowed="true"
auth="Container"
defaultAutoCommit="false"
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
initialSize="0"
logAbandoned="true"
maxActive="10"
maxIdle="0"
maxWait="15000"
minIdle="0"
name="jdbc/AdminDB"
removeAbandoned="true"
removeAbandonedTimeout="30"
timeBetweenEvictionRunsMillis="30000"
type="javax.sql.DataSource"
url="jdbc:derby:/Users/jdoe/CALiveAPICreatorAdmin;create=true"
username="CALiveAPICreatorAdmin"/>

The url parameter must point to the directory for an existing admin database or to a non-existing directory which will be created. You can specify any path in the URL. On Windows, you can specify a drive, for example:
jdbc:derby:d:\Users\jdoe\CALiveAPICreator;create=true

Note: The create=true parameter creates a new database directory if one does not exist. This is usually desirable, at least for the first time.

For more information about the JavaDB URL, see the Development Guide on the Apache.org site.

If you have a port conflict with the default 8080 port, open the start.ini file in the home folder and change the following snippet:

## Connector port to listen on

jetty.http.port=8080