Configuring Import Failover

An import service normally reads files from a local file system. If the service or server is stopped, the files will not be processed and no content will be imported. You can, however, set up the service so that it can run on one of several servers. It only actually runs on one of them at any particular time, but if it stops for any reason, then one of the other servers will take over. This process is called "failover". To enable automatic failover you must:

  1. Enable the import service on more than one server.

  2. Ensure that the importDirectory property of XMLImportConfiguration points to a folder on a shared file system.

  3. Open configuration-root/com/escenic/syndication/xml/XMLImportService.properties and make the following changes:

    • Replace

      $class=com.escenic.syndication.xml.XMLImportService

      with

      $class=com.escenic.syndication.xml.MutexXMLImportService
    • Add the following entries:

      serviceName=MutexXMLImportService
      alarmManager=/neo/io/managers/AlarmManager
      resourceLockManager=/io/api/DatabaseResourceLockManager
      validateInterval=60

    These changes ensure that the import service only runs on one server. If it stops, however, then it will be automatically started on another server.