Configuring the SourceJammer 2.0 Server

Document version: 1.0. Revision Date: 01/23//2003


Overview

Two files control the configuration of the SourceJammer 2.0 Server: conf.xml and serverconf.xml. This document explains the purpose of each of the arguments in these configuration files and also provides information about the other files located in the server's conf directory.

This document does not describe how to configure Jakart-Tomcat or Apache SOAP. For information on configuring Jakarta-Tomcat, please visit the Jakarta web site. For information on Apache SOAP, please visit the Apache XML web site.

NOTE: If you change the configuration of your SourceJammer server, you must restart the server for the changes to take effect.

The conf Directory

The server installation of SourceJammer includes a conf directory that is the home for the server's configuration files. The server also adds and maintains additional files in this directory. This directory should be located in your webapps/sourcejammer directory.

The conf directory contains the following:

  • conf.xml
  • serverconf.xml
  • By default, the SourceJammer server's conf directory is located under the SourceJammer webapp's WEB-INF directory. If you want to put your conf directory in a different location, you must set the baseConfigPath init parameter for the AppConfigInitServlet in the web.xml file.

    conf.xml: AppConfig

    The conf.xml for the SourceJammer server contains only one node.

    DontZipFileExtensions

    Default Value: zip gz jpg jar

    A space-separated list of file extensions for file types that the SourceJammer server should not waste it's time trying to compress before sending to the client. By default (if the node does not appear in conf.xml), the server will not try to zip the following extensions: zip, gz, jpg, jar. If you add this node to your conf.xml file, and you need to include these extensions among the values you list if you don't want the server to try to zip files of these types.

    serverconf.xml: Server Config

    The serverconf.xml file contains 6 nodes, all of which are used by the server.

    MaxCacheSize

    Default Value: 1000

    The maximum number of files/projects to store in the cache. When the server receives a request for information about a project or file on the server, it first looks in the in-memory cache to see if the file or project is already in memory. If the file or project is not in the cache, the server the reads the information from the file system and adds it to the cache. The MaxCacheSize sets the maximum number of files/projects t hat can be in the cache. When the max is reached and a new file/project needs to be added to the cache, the server removes the "oldest" file/project from the cache before adding the new file/project. The oldest file/project is the one that has been in the cache for the longest without being accessed.

    The best value for MaxCacheSize depends on the available memory of your server, the amount of traffic on your SourceJammer server, and the number of files and project on your SourceJammer server.

    You can check on the status of your server's cache by pointing a web browser to:
    http://myurl/sourcejammer/AppStats
    Where "myurl" is the URL of your server and "sourcejammer" is the context of your SourceJammer server.

    The AppStats page lists the maximum size of the cache, the current size, the number of "hits", or requests your SourceJammer server has received since it was last started, and the number of these requests that were found in the cache. The AppStats page also lists an efficiency rating. This is the percentage of all requests that could be found in the cache. You can use this value to help you optomize your MaxCacheSize.

    EnableAnonymousAccess

    Default Value: true

    Sets whether or not the SourceJammer server allows anonymous access. Anonymous access is read-only. Anonymous users can view the project structure and get files or previous versions of files. They cannont make any changes to the server or archives.

    AnonymousUserName

    Default Value: anon

    This is both the user name and password users can use to gain anonymous read-only access to the SourceJammer server.

    EnableWebAccess

    Default Value: true

    Sets whether or not web access is enabled for the SourceJammer server. Web access is anonymous access via a web browser. In order for web access to work, anonymous access must be enabled.

    The address to use to access your SourceJammer server with a web browser is:
    http://myurl/sourcejammer
    Where "myurl" is the URL of your server and "sourcejammer" is the context of your SourceJammer server.

    WebInterfaceTitle

    Default Value: SourceJammer

    Sets the title to display on the web interface.

    WebInterfaceInfo

    Default Value: For more information on SourceJammer, visit SourceJammer.org

    Sets the text for the sub-paragraph below the title in the web interface.

    ServerDirectory

    Default Value: null. Set by install script or set manually upon installation.

    Sets the location of the server directory for the SourceJammer server. The server directory typically contains two sub-directories: filesys and archives.

    The filesys directory contains one or more .sja files. There should be one .sja file for each archive you have created on your SourceJammer server. This directory also contains the userCounter and users.xml file for the server

    The archives directory contains archive data--including file/project meta-data files and all of the actual files and previous versions of files in your server's archives. This directory contains one subdirectory for each archive on the server.

    It is possible to configure the 'root' directory of each archive individually, in which case, some or all archives may not store their files in the archives directory.

    FileSysDirectory

    Default Value: null. If ServerDirectory is set and this value is not, will be [server directory]/filesys

    Sets the location of the filesys directory see the Server Directory section for more information

    DefaultArchiveRoot

    Default Value: see below

    This value is the path to the archives directory that contains all of the full archives for this server. The archives will contain all the file and project information, plus the complete latest versions of all file and all file diffs for this server, so this directory must be on a drive that contains enough free space for this purpose.

    If this node is not included in serverconf.xml, then as a default the system will use [server directory]/archives. If an archives directory is not found here, one will be created.

    ComparisonChunkSize

    Default value: 100

    Indicates the number of bytes that are compared when SourceJammer is building diffs for binary files. When comparing two binary files, in order to determine that any portion of those two files are the same, the server must find that this many bytes are exactly the same. Think of the ComparisonChunkSize like a word length or line length for binary comparisons.

    Binary Diffs have for all intents and purposes been deprecated as of 1.2.x, so there is no real need to maintain this parameter.

    BinaryRangeSize

    Default Value: 1000

    Indicates the range used in building binary diffs. When comparing two binary files for building a diff, SourceJammer performs its comparison within only a limited range of each file at a time. This node sets the size of this range.

    Binary Diffs have for all intents and purposes been deprecated as of 1.2.x, so there is no real need to maintain this parameter.

    userCounter

    This file is used to generate unique ID numbers for the users defined on the SourceJammer server.

    users.xml

    Contains all of the user information for the SourceJammer server. WARNING. Contains sensitive user information and you want to make sure it is protected. Be sure to store it in a non-public directory on your server.