apache derby deployment modes

Apache Derby supports several deployment modes, including:

  1. Embedded Mode: In this mode, the Derby engine runs within the same JVM as the application that uses it. This is the simplest deployment mode and is ideal for small applications where the database is used by a single application. In embedded mode, the database is created and managed by the application itself.

  2. Network Server Mode: In this mode, the Derby engine runs as a standalone server process that can be accessed by multiple applications over a network. This mode is suitable for larger applications where multiple applications need to access the same database simultaneously. In network server mode, the database is managed by the Derby server and can be accessed by multiple clients.

  3. Embedded with Derby Network Server Mode: This mode combines the benefits of both embedded mode and network server mode. In this mode, the Derby engine runs as an embedded engine within the application, but can also be accessed by other applications over a network.

  4. Cloudscape Compatibility Mode: This mode is provided for applications that were originally designed to use IBM's Cloudscape database engine. This mode provides backward compatibility with Cloudscape and allows these applications to use Derby without any modifications.

  5. Automatic Embedded Mode: This mode is a variation of embedded mode that allows an application to switch between embedded and network server modes automatically based on the configuration. In this mode, the application can start in embedded mode and then switch to network server mode if needed.

The deployment mode that is best for a particular application depends on factors such as the size and complexity of the application, the number of users, and the level of concurrency required. Developers should carefully consider these factors before choosing a deployment mode for their application.