Java DB

Apache Derby

Derby Server and Administration Guide

Derby Getting Started
Derby Reference Manual
Derby Developer's Guide
Derby Performance Tuning
Derby Server and Admin Guide
Derby Tools and Utilities
Derby Server and Admin Guide
-Part one: Derby Server Guide
-Derby in a multi-user environment
-Using the Network Server with preexisting Derby applications
-The Network Server and JVMs
-Installing required jar files and adding them to the classpath
-Starting the Network Server
-Shutting down the Network Server
-Obtaining system information
-Accessing the Network Server by using the network client driver
-Accessing the Network Server by using a DataSource object
-XA and the Network Server
-Using the Derby tools with the Network Server
-Differences between running Derby in embedded mode and using the Network Server
-Setting port numbers
-Managing the Derby Network Server
-Managing the Derby Network Server remotely by using the servlet interface
-Derby Network Server advanced topics
-Derby Network Server sample programs
-Part two: Derby Administration Guide
-Checking database consistency
-Backing up and restoring databases
-Replicating databases
-Logging on a separate device
-Obtaining locking information
-Reclaiming unused space

 

Managing the Derby Network Server remotely by using the servlet interface

You can use the servlet interface to manage the Network Server remotely. To use the servlet interface, the servlet must be registered with an Application Server, and derby.system.home must be known to the Application Server.

A Web application archive (WAR) file, derby.war, for the Derby Network Server is available in $DERBY_HOME/lib. This file registers the Network Server's servlet at the relative path /derbynet. See the documentation for your Application Server for instructions on how to install it.

For example, if derby.war is installed in WebSphere Application Server with a context root of derby, the URL of the server is:

http://<server>[:port]/derby/derbynet
Notes:
  • A servlet engine is not part of the Network Server.
  • When the Network Server is started by the servlet interface, shutting down the Application Server also shuts the Network Server down, since both run in the same JVM.

The servlet takes the following optional configuration parameters:

host
Specifies the host name to be used by the Network Server. See the Security Considerations section below.
portNumber
Specifies the port number to be used by the Network Server.
startNetworkServerOnInit
Specifies that the Network Server is to be started when the servlet is initialized.
tracingDirectory
Specifies the location for trace files. If the tracing directory is not specified, the traces are placed in derby.system.home.

Security Considerations

For general security considerations for the Network Server, see Network Server security.

The "host" parameter allows configuration of the host name that will be used for the listening socket for network connections. By default, the Network Server will listen to requests only on the loopback address, which means that it will only accept connections from the local host. Changing this value could expose the server to external connections, which raises security concerns, so before using the "host" parameter, you should run under the Java security manager and enable user authentication.

This section describes the servlet pages.

 

javadb@jdbcurl.com