background image
<< Running the NsSample sample program | Network Server sample programs >>

java org.apache.derby.tools.sysinfo

<< Running the NsSample sample program | Network Server sample programs >>
Derby Server and Administration Guide
55
derbytools.jar
The Derby tools jar file.
3. Test the CLASSPATH settings by running the following Java command:
java org.apache.derby.tools.sysinfo
This command shows the Derby jar files that are in the classpath as well as their
respective versions.
4. After you set up your environment correctly, run the NsSample program from the
same directory:
java nserverdemo.NsSample
If the program runs successfully, you will receive output similar to that shown in the
following table:
Derby Network Server created
Server is ready to accept connections on port 1621.
Connection number: 1.
[NsSample] Derby Network Server started.
[NsSample] Sample Derby Network Server program demo starting.
Please wait .....................
Connection number: 2.
[NsSampleWork] Begin creating table - SAMPLETBL and necessary
indexes.
[NsSampleClientThread] Thread id - 1; started.
[NsSampleWork] Thread id - 1; requests database connection,
dbUrl =jdbc:derby:NSSampledb;
[NsSampleClientThread] Thread id - 2; started.
[NsSampleWork] Thread id - 2; requests database connection,
dbUrl =jdbc:derby://localhost:1621/
NSSampledb;deferPrepares=true;
Connection number: 3.
[NsSampleWork] Thread id - 1 selected 1 row [313,Derby36
,1.7686243E23,9620]
[NsSampleWork] Thread id - 1 selected 1 row [313,Derby36
,1.7686243E23,9620]
[NsSampleWork] Thread id - 1; deleted 1 row with t_key = 9620
[NsSampleWork] Thread id - 1 selected 1 row [700,Derby34
,8.7620301E9,9547]
[NsSampleWork] Thread id - 1 selected 1 row [700,Derby34
,8.7620301E9,9547]
[NsSampleWork] Thread id - 2 selected 1 row [700,Derby34
,8.7620301E9,9547]
[NsSampleWork] Thread id - 2 selected 1 row [700,Derby34
,8.7620301E9,9547]
[NsSampleWork] Thread id - 1; inserted 1 row.
[NsSampleWork] Thread id - 1 selected 1 row [52,Derby34
,8.7620301E9,9547]
[NsSampleWork] Thread id - 2; updated 1 row with t_key = 9547
[NsSampleWork] Thread id - 1; deleted 1 row with t_key = 9547
[NsSampleWork] Thread id - 2 selected 1 row [617,Derby31
,773.83636,9321]
[NsSampleWork] Thread id - 2 selected 1 row [617,Derby31
,773.83636,9321]
[NsSampleWork] Thread id - 2 selected 1 row [617,Derby31
,773.83636,9321]
[NsSampleWork] Thread id - 2 selected 1 row [617,Derby31
,773.83636,9321]
[NsSampleWork] Thread id - 1; inserted 1 row.
[NsSampleWork] Thread id - 2; deleted 1 row with t_key = 9321
[NsSampleWork] Thread id - 1; deleted 1 row with t_key = 8707
[NsSampleWork] Thread id - 1; closed connection to the database.
[NsSampleClientThread] Thread id - 1; finished all tasks.
[NsSampleWork] Thread id - 2; deleted 1 row with t_key = 8490
[NsSampleWork] Thread id - 2; closed connection to the database.
[NsSampleClientThread] Thread id - 2; finished all tasks.
[NsSample] Shutting down Network Server.