Embedded deployment application overview In an embedded environment, runs in the same JVM as the application. embedded applicationsdeploying embedded environmentssingle-user application embedded environmentsmulti-user application server embedded environmentsoverview

The application can be a single-user application or a multi-user application server. In the latter case, runs embedded in the user-provided server framework, and any client applications use user-provided connectivity or allow the application server to handle all database interaction.

The following figure shows embedded in a single-user Java application.

<ph conref="../conrefs.dita#prod/productshortname"></ph> embedded in a single-user Java application This figure shows the single-user application and the Derby database engine inside the Java Virtual Machine. The single-user application connects to the Derby database engine by using the JDBC API. The Derby database engine connects to the Derby database.

The following figure shows embedded in a multi-user Java application server.

Derby embedded in a multi-user Java application server This figure shows multiple users connecting to the application server, which contains the application and the Derby database engine. The application connects to the Derby database engine. The Derby database engine connects to the Derby database.

When a database is embedded in a Java application, the database is dedicated to that single application. If you deploy more than one copy of the application, each application has its own copy of the database and software. A server framework can work in multi-threaded, multi-connection mode and can even connect to more than one database at a time. A server framework, such as the Network Server, can be used to manage multiple connections and handle network capabilities. Some server framework solutions, such as WebSphere Application Server, provide additional features such as web services and connection pooling. However, only one server framework at a time can operate against a database.

The application accesses an embedded database through the JDBC API. To connect, an application makes a call to the local JDBC driver. Accessing the JDBC driver automatically starts the embedded software. The calling application is responsible for shutting down the embedded database software.