apache > db
Apache DB Project
Font size:      

Starting the Derby Network Server

Starting the Derby Network Server

The Derby Network Server allows multiple applications running in different Java Virtual Machines to access a single Derby database. Once the Network Server is started client applications from within Eclipse, such as ij or other Java applications, can access a Derby database. Additionally, the Network Server allows for client applications outside of Eclipse on the localhost, or even on remote hosts to access the same database.

To start the Derby Network Server

  • The Derby nature needs to be added to the project prior to starting the Network Server.

  • With the Java project selected, bring up the context menu and select the menu item, Apache Derby, Start Derby Network Server.
Start Derby Network Server
  • The pop-up box will appear which states the Apache Derby Network Server is attempting to be started.
  • If the network server startup is successful the Console view will display Server is ready to accept connections on port xxxx. For each project that has a running Network Server associated with it a green arrow appears next to the project name.
Network Server started
  • If other items that use the console as a display hide the Network Server console use the Display Selected Console drop down icon to the right of the console menu bar to make the Network Server console visible.

Derby Network Server Host value

By starting the Derby Network Server using the default values the server runs on the localhost, which is the host running Eclipse, on port 1527. To change the host name or the port number where the Derby Network Server is running see Setting Derby properties for a project.

The value used for the Network Server host name impacts the ability of remote hosts to connect to the Network Server. If the Network Server Host value in the Project Properties is set to localhost, only clients running on the host where Eclipse is running can connect to the network server. If an ip address or hostname (other than the name 'localhost') is used, client applications running on other hosts can connect to the Derby Network Server. For additional information about starting the Derby Network Server see the Derby Server and Administration Guide. The section called Starting the Network Server explains the effect of setting the value for the hostname differently.

If connections from other hosts will be allowed, it is recommended to run under the Java security manager and enable user authentication prior to starting the Derby Network Server.