apache > db
Apache DB Project
 
Font size:      

Deployment Cheat Sheets

Deployment Cheat Sheets

Deploying Derby in an Embedded Environment

You can "embed" Derby in any Java application (single- or multi-user) by deploying the following package:

  • the Derby library (derby.jar)
  • the application's libraries

    You have the option of storing these libraries in the database. (See Loading Classes from a Database.)

  • the database or databases used by the application, in the context of their system directory (see Embedded Systems and Properties)

    Figure 5. Deploying an application, embedded Derby software, and the database. Storing the application in the database and setting properties as database-wide properties simplify deployment.

    Graphic 1; A slightly more complicated deployment with the application and properties outside of the database. Graphic 2; A simplified deployment with application and properties stored in the database.

Embedded Systems and Properties

  • Are any system-wide properties being set that could be set as database-wide properties? Database-wide properties are stored in the database and are simpler for deployment. System-wide parameters might be easier for development.
  • Are any properties being set in the derby.properties file? Database-wide properties are stored in the database and are simpler for deployment. Some properties can only be set on a system-wide basis. If so, deploy the entire system directory along with the properties file. Deploy only those databases that you wish to include. Setting properties programmatically can simplify this step-- you will not have to worry about deploying the system directory/properties file.

Before deploying your application, read Recommended Practices.

Extra steps are required for deploying an application and an embedded database on read-only media. See Creating Derby Databases for Read-Only Use.


Previous Page
Next Page
Table of Contents
Index