apache > db
Apache DB Project
 
Font size:      

Servlet Interface

Servlet Interface

The servlet interface can be used to start the network server remotely. To use the servlet interface, the servlet must be registered with a web server and derby.system.home must be known to the web server.

A Web application archive (WAR) file, derby.war, for the Derby Network Server is available in $DERBY_INSTALL/frameworks/NetworkServer/war. This WAR registers the Network Server's servlet at the relative path /derbynet. Please 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 cns, then the URL of the server is:

http://server[:port]/cns/derbynet
Note:
A servlet engine is not part of the Network Server.

The servlet takes the following optional configuration parameters:

  • 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.

The servlet displays the following pages:

Start-up page

Use the Start-up page to start the server.

You can choose the following options from the startup page:

  • turn logging on when the server is started.
  • turn tracing on for all sessions when the server is started.
  • start the server.

Running page

If the network server is running (whether it was started by initializing the servlet or in some other manner), the running page is displayed. The running page indicates whether logging is on or off, whether tracing is on or off, and if tracing is on, indicates for which session.

You can use the running page to stop the server and turn logging and tracing on or off, boot or shut down databases. The following options are available from the running page:

  • start or stop logging.
  • start or stop tracing all sessions.
  • specify session to trace. (If you choose this option, the Trace session page is displayed.)
  • change tracing directory (If you choose this option, the Trace directory page is displayed.)
  • specify threading parameters for network server. (If you choose this option, the Thread parameters page is displayed.)
  • stop the application server.

Trace session page

If on the running page you choose to specify a session to trace, this page is displayed. You must enter the Session ID.

You are given the option to turn tracing on or off or return to the previous menu. When you push the Trace On/Off button, information indicating the current tracing state is displayed.

Trace directory page

This page is displayed if the you choose to change the tracing directory on the Running page. You must enter the Trace Directory.

You are given the option to set a tracing directory or return to the previous menu. Additional information is displayed indicating the current tracing directory when you push the Set Directory button.

Test Connection

This page is displayed if the test connection button is pressed.

Enter the following applicable information:

  • Database Directory (optional).

    Specify database to test connection to or leave blank to test connecting to network server.

  • UserID (required if user authentication is enabled)
  • Password (required if user authentication is enabled)

You are given the option to test the connection or return to the previous Menu.

Information about the success or failure of the connection test will be displayed when the test connection button is pushed.

Set Network Server Parameters

The first page is displayed if the thread parameter button is pressed. This page sets the new parameters. Enter the following applicable information:

  • New maximum number of threads
  • New thread time slice
Note:
If the either the maximum or time slice parameters are left blank, that value is left unchanged from the current setting.

You are given the option of setting the parameters or returning to the previous menu.

The updated values for the maximum and the time slice are displayed when Set Network Server Parameters is pressed.


Previous Page
Next Page
Table of Contents
Index