That's all there is to it.
Before you run the
In a client/server environment, the client
program is often used from other computers on the network. Whenever a system
accepts connections from other computers, there is a chance of abuse. To maintain
security, the Derby Network Server defaults to accepting connections only from
clients running on the local machine (
With Network Server
started, you can run the client program simultaneously in multiple windows.
To demonstrate this, open two command windows and perform the substeps of the Run
the client program step in each window. Both clients will operate
without a problem. In contrast, it would not be possible for a program that
uses the embedded driver (e.g.
You may have noticed that the client program does not shut down the database. This is because the database is a shared resource in a client/server environment and, in most cases, should only be shut down when the Server is shut down. If multiple clients are accessing the database and one shuts down the database, the remaining clients will encounter a failure the next time they attempt an SQL command.
Derby's two architectures have caused confusion for some new Derby users. They mistakenly think that embedded is a single user configuration. This is not true. The embedded driver supports multiple simultaneous connections, performs locking, and provides performance, integrity and recoverability. Any application using the embedded driver can open multiple Derby connections and then provide a means for multiple users to interact with the database on each connection. The Derby Network Server is an example of such an application.