Dwarf Server Framework 1.3.1

Installation


Content


Requirements

Dwarf Server Framework requires the Java™ 2 Runtime Environment (JRE) version 1.4 or higher installed on the target platform for the basic runtime operation.

The Java™ 2 Software Development Kit (JDK) version 1.4 or higher is needed to build the sources and to develop your own Dwarf-based applications.


Installation

  1. Unpack the distribution file.

  2. The sample configuration files can be found in the "conf/samples/dwarf/" subdirectory. This subdirectory contains also other nested directories with configuration files specific to the particular sample applications.

  3. Run one of the sample applications with the "run.bat" command on Windows or "run.sh" command on a Unix system. Provide a URL of the application's main configuration file as the command-line argument:
        C:\Dwarf> run.bat conf/samples/dwarf/rfc/main.xml
        
          -- or --
    
        localhost:/usr/dwarf/# ./run.sh conf/samples/dwarf/rfc/main.xml
        
    Note: If you get the "Out of environment space" error message on Windows 9x, try the "run98.bat" instead.

    The sample applications implement several basic TCP-based network services. Use telnet and connect to 127.0.0.1 port 17 to see if the server is working properly. It should print out a single quote each time you make a connection to the given address and port. (This is because the port number 17 is used by the Quote of the Day network service.) Additional ports can be examined in the same way for the Discard Service (port 9), Daytime Service (port 13), Echo Service (port 7) and Character Generator Service (port 19).

  4. Press Enter at the command prompt while the server is running to get into the server's management console. The help command will show you a list of available commands, including the useful shutdown command, which will cause the main application to quit.

  5. The application log files are written to the "log/" subdirectory of the Dwarf installation home. You may review these files for the application event records and eventual error messages.


Executing

The "run.bat" and "run.sh" scripts can be used to start the applications easily. They accept two optional arguments - an URL of the application's XML configuration, and the name of Java class to be executed. If there is only one argument specified, it is always regarded as XML configuration URL. If there is no argument at all, the default "file:conf/main.xml" URL will be used.
The JAVA_HOME enviroment variable is detected automatically and will be used (if present) to locate the Java executable file.

If you encounter problems on Windows 9x platform while trying to execute the "run.bat" script, use the "run98.bat" command instead. It should eliminate the "Out of environment space" error.

The main application executable class is SK.gnome.dwarf.main.Main. Its main(String[]) static method requires just one string argument which must be a URL of the main application's XML configuration. This argument is passed in to the main method by the mentioned scripts, too.

When running the application by a custom script, all JAR class libraries from the "lib/" subdirectory tree must be included in the classpath prior to invoking the main executable method. A typical custom executable script may look like this:

On Windows system:

@echo off
set CP=lib/dwarf.jar;lib/priv/dwarf_priv.jar
java -cp %CP% SK.gnome.dwarf.main.Main %1

On Unix system:

#!/bin/sh
CP=lib/dwarf.jar:lib/priv/dwarf_priv.jar
java -cp $CP SK.gnome.dwarf.main.Main $1

The "bin/dwarf.sh" script can be used to control the Dwarf process execution on Unix-based platforms. It may be copied to the system startup directory, like "/usr/local/etc/rc.d" or "/etc/init.d", to automatically start and stop the Dwarf server during the system startup and shutdown. See the script's source code for more information.


Configuration

The "conf/" subdirectory of the Dwarf installation should be used for the production configuration files. By default, it contains no files. The sample configuration files, which comes with the distribution, can be found in the "conf/samples/dwarf/" subdirectory tree.

The sample applications included in the distribution package are covered by the Sample Applications document.

The general configuration of the Dwarf-based applications is explained in the Application Configuration Guide.

 

Return to the main page.


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.