Skip to content
JochenGraf edited this page May 6, 2015 · 104 revisions

Jochen Graf (ENArC)

MOM-CA is an XRX application running in an eXist Native XML Database instance. eXist itself is a Java application, which integrates a Jetty server for HTTP handling. All XRX project settings, Java settings, eXist settings and Jetty settings relevant for the MOM-CA platform can be centrally configured in the build.properties.xml configuration file to be found in the topmost directory.

<?xml version="1.0" encoding="UTF-8"?>
<!-- @author: Jochen Graf -->
<XRX>
  <!-- ########## XRX Project Settings ########## -->
  <project-name>mom</project-name>
  <deploy>core/**,mom/**</deploy>
  <password>admin</password>

  <!-- ########## OS Settings ########## -->
  <os>
    <windows>
      <bitness>64</bitness>
      <serviceName>mom.XRX-1</serviceName>
    </windows>
  </os>

  <!-- ########## Java Settings ########## -->
  <java>
    <initmemory>256</initmemory>
    <maxmemory>512</maxmemory>
  </java>

  <!-- ########## eXist Settings ########## -->
  <exist>
    <cache-size>64</cache-size>
    <collection-cache>64</collection-cache>
    <lucene-buffer>64</lucene-buffer>
    <backup-cron-trigger>0 0 4 * * ?</backup-cron-trigger>
    <revision></revision>
  </exist>

  <!-- ########## Jetty Settings ########## -->
  <jetty>
    <port>8181</port>
    <port-ssl>8444</port-ssl>
    <servername>localhost</servername>
  </jetty>
</XRX>

<project-name>mom</project-name>

mom is the short name for the MOM-CA platform. For MOM-CA, this configuration option should not be changed! MOM-CA can be and was (re)used by other XRX platforms as an XRX application framework for collaborative archival platforms in general. The platform Virtuelles deutsches Urkundennetzwerk and Itinera Nova configure their own short names such as vdu or in here.

<deploy>core/**,mom/**</deploy>:

The core/**,mom/** setting is relevant for XRX application deployment. MOM-CA depends on the so called XRX core project and thus, besides its own source files, includes all directories and files below the XRX core directory. XRX platforms such as Itinera Nova reusing the MOM-CA platform configure, for example, core/**,mom/**,in/** here to include the XRX core source code as well as the MOM-CA source code.

<password/>

An XRX platform needs a project password to perform security-critical tasks such as the registration of new users. A password is required, not optional! The password is at the same time the database password for the eXist admin user, which is allowed to use all database administration tools, for example the Java Admin Client. It is recommended to always use the same password on the development server and on the production server to avoid security conflicts when deploying files directly from development to production or vice versa.

<bitness>64</bitness>
<serviceName>mom.XRX-1</serviceName>

Specify whether you have a 32-bit or 64-bit operating system. Note that the bitness of your operating system is relevant here, not the bitness of your Java Virtual Machine. If you want to run more than one XRX server instance on one Windows computer, you have to choose a different serviceName for each instance, e.g., mom.XRX-1 or mom.XRX-2. The name of the service may not contain any spaces and no special characters. These two settings are relevant for installation on Windows only. Linux installations need no special settings.

<initmemory>256</initmemory>
<maxmemory>6144</maxmemory>

These settings are highly important, since they configure the initial heap size of the Java Virtual Machine (JVM) running the MOM-CA platform. The size of the parameters depends on the number of documents stored in the eXist database. For the currently about 400.000 XML documents, 6144 megabytes maximum heap size and 256 megabytes initial heap size may be a good choice. It is required to configure the heap size as a power of two and in megabytes, e.g. 512, 1024, 2048 and so on. Make sure that the maximum heap size parameter is under no circumstances greater than the size of free memory available on your Linux machine! For more information about Java performance tuning see, for example, the eXist tuning guide.

<cache-size>256</cache-size>
<collection-cache>256</collection-cache>
<lucene-buffer>256</lucene-buffer>

These cache and buffer settings are internally used by eXist for indexing, updating and querying (large) XML document collections. Together, these parameters should not be larger than one third of the maximum heap size configured above. Assuming 6144 megabytes of maximum heap size, 256 megabytes for each cache setting parameter may be a good choice. For detailed information, see the eXist configuration guide.

<backup-cron-trigger>0 0 4 * * ?</backup-cron-trigger>

It is recommended to configure a daily database backup for the MOM-CA data. The point in time is configured by means of a so called cron expression. Since the eXist database is completely blocked for about 10 to 15 minutes while the backup is running, and that for all incoming HTTP requests, be it read operations or write operations, it is recommended to trigger the backup at a time when less users are working with MOM-CA, e.g. daily at 4:00 AM (0 0 4 * * ?).

<revision/>

When upgrading the MOM-CA platform from one eXist version to another there sometimes appeared critical bugs in the past. In such situations, it was necessary to not use the new eXist release version for production but a specific later revision that contained the necessary bug fixes. For the current eXist 2.0 release, however, this parameter is not needed and not in use.

<port>8181</port>
<port-ssl>8484</port-ssl>
<servername>localhost</servername>

These parameters configure the Jetty server. All parameters are required. Port specifies the server port where MOM-CA shall run. The eXist-Jetty-bundle in addition expects a port number for SSL connections different from the main port number. Although SSL conncections are currently not used by MOM-CA, this parameter is also required. Servername specifies the name of the Linux machine where MOM-CA is running. In the case of a local development machine, localhost is expected; in the case of a public server, the public host name is expected here. It is to remark that the host name must be the name of the host server and not the name of the proxy server! See the eXist documentation for more information about proxying eXist behind a web server.

Clone this wiki locally