Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Include Page
FEDORA36:_newreleaseFedoraRepositoryFEDORA36:
_newreleaseFedoraRepository

...

Configuring the Management module within fedora.fcfg:

Code Block
xmlxml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management"
  class="org.fcrepo.server.management.ManagementModule">
 <!-- ManagementModule configuration params go here -->
</module>

...

Configuring the Journaler and Management modules within fedora.fcfg:

xml
Code Block
xml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management"
  class="org.fcrepo.server.journal.Journaler">
</module>
<module role="org.fcrepo.server.management.ManagementDelegate"
  class="org.fcrepo.server.management.ManagementModule">
 <!-- ManagementModule configuration params go here -->
</module>

...

If a Transport encounters an error while writing a Journal entry, the action taken depends on whether the Transport has been configured as "crucial" or not. If the Transport is not crucial, the exception is written to the log, and operation continues normally. If the Transport is crucial, the exception is passed on, and the user sees an error status on their request, The server is placed into read-only mode, and will accept no further alterations to the repository until the error is corrected. At least one Transport must be configured as "crucial". The following excerpt from fedora.fcfg shows a server that writes Journal files to a local file system, and to two follower systems via RMI.

Code Block
xmlxml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management" class="org.fcrepo.server.journal.Journaler">
  <param name="journalFileSizeLimit" value="100M"/>
  <param name="journalFileAgeLimit" value="1H"/>
  <param name="journalWriterClassname"
         value="org.fcrepo.server.journal.readerwriter.multicast.MulticastJournalWriter"/>
  <param name="transport.local.classname"
         value="org.fcrepo.server.journal.readerwriter.multicast.LocalDirectoryTransport"/>
  <param name="transport.local.directoryPath" value="/usr/local/journals/archiveFiles"/>
  <param name="transport.local.crucial" value="true"/>
  <param name="transport.follow1.classname"
         value="org.fcrepo.server.journal.readerwriter.multicast.rmi.RmiTransport"/>
  <param name="transport.follow1.crucial" value="false"/>
  <param name="transport.follow1.hostName" value="follow1.nsdl.org"/>
  <param name="transport.follow1.service" value="RmiJournalReceiver"/>
  <param name="transport.follow2.classname"
         value="org.fcrepo.server.journal.readerwriter.multicast.rmi.RmiTransport"/>
  <param name="transport.follow2.crucial" value="false"/>
  <param name="transport.follow2.hostName" value="follow2.nsdl.org"/>
  <param name="transport.follow2.service" value="RmiJournalReceiver"/>
</module>

...

Configuring for normal mode:

xml
Code Block
xml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management"
     class="org.fcrepo.server.journal.Journaler">
  <param name="journalDirectory"
     value="/usr/local/ndr-content/journals/journalFiles"/>
  <param name="journalWriterClassname"
     value="org.fcrepo.server.journal.readerwriter.multifile.MultiFileJournalWriter"/>
  <param name="journalFileSizeLimit" value="100M" />
  <param name="journalFileAgeLimit" value="1H" />
</module>
<module role="org.fcrepo.server.management.ManagementDelegate"
     class="org.fcrepo.server.management.ManagementModule">
 <!-- ManagementModule configuration params go here -->
</module>

Configuring for recover mode:

Code Block
xmlxml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management"
        class="org.fcrepo.server.journal.Journaler">
  <param name="journalMode" value="recover"/>
  <param name="journalDirectory"
         value="/usr/local/ndr-content/journals/journalFiles"/>
  <param name="archiveDirectory"
         value="/usr/local/ndr-content/journals/archiveFiles"/>
  <param name="journalReaderClassname"
         value="org.fcrepo.server.journal.readerwriter.multifile.MultiFileJournalReader"/>
  <param name="journalRecoveryLogClassname"
         value="org.fcrepo.server.journal.recoverylog.RenamingJournalRecoveryLog"/>
  <param name="recoveryLogFilename"
         value="/usr/local/ndr-content/journals/journal.recovery.log"/>
</module>
<module role="org.fcrepo.server.management.ManagementDelegate"
        class="org.fcrepo.server.management.ManagementModule">
 <!-- ManagementModule configuration params go here -->
</module>

Configuring for recover mode in a "following" server:

xml
Code Block
xml
borderStylesolid
xml
<module role="org.fcrepo.server.management.Management"
        class="org.fcrepo.server.journal.Journaler">
  <param name="journalMode" value="recover" />
  <param name="journalDirectory"
         value="/usr/local/ndr-content/journals/journalFiles"/>
  <param name="archiveDirectory"
         value="/usr/local/ndr-content/journals/archiveFiles"/>
  <param name="journalReaderClassname"
         value="org.fcrepo.server.journal.readerwriter.multifile.LockingFollowingJournalReader"/>
  <param name="lockRequestedFilename"
     value="/usr/local/ndr-content/journals/StopAcceptingJournals.lock"/>
  <param name="lockAcceptedFilename"
         value="/usr/local/ndr-content/journals/AcceptedJournalStop.lock"/>
  <param name="journalRecoveryLogClassname"
         value="org.fcrepo.server.journal.recoverylog.RenamingJournalRecoveryLog"/>
  <param name="recoveryLogFilename"
         value="/usr/local/ndr-content/journals/journal.recovery.log"/>
  <param name="followPollingInterval" value="10"/>
</module>
<module role="org.fcrepo.server.management.ManagementDelegate"
        class="org.fcrepo.server.management.ManagementModule">
 <!-- ManagementModule configuration params go here -->
</module>

...

This shows the possible content of an entry in the Journal file. The Context structure was simplified for this example. In normal operation a Context will probably contain more keys and values.

Code Block
xmlxml
borderStylesolid
xml
<?xml version="1.0" encoding="UTF-8"?>
<FedoraJournal repositoryHash="3|2,1,0" timestamp="2006-06-15T09:45:35.683-0400">
  <JournalEntry method="purgeObject" timestamp="2006-06-15T09:45:35.683-0400"
                clientIpAddress="127.0.0.1" loginId="fedoraAdmin">
    <context>
      <password>fedoraAdmin</password>
      <noOp>false</noOp>
      <now>2006-06-15T09:45:35.683-0400</now>
      <multimap name="environment">
        <multimapkey name="urn:fedora:names:fedora:2.1:environment:httpRequest:authType">
          <multimapvalue>BASIC</multimapvalue>
        </multimapkey>
        <multimapkey name="urn:fedora:names:fedora:2.1:environment:httpRequest:serverIpAddress">
          <multimapvalue>127.0.0.1</multimapvalue>
        </multimapkey>
        <multimapkey name="urn:fedora:names:fedora:2.1:environment:httpRequest:serverPort">
          <multimapvalue>8080</multimapvalue>
        </multimapkey>
        <multimapkey name="urn:fedora:names:fedora:2.1:environment:httpRequest:method">
          <multimapvalue>POST</multimapvalue>
        </multimapkey>
        <multimapkey name="urn:fedora:names:fedora:2.1:environment:httpRequest:protocol">
          <multimapvalue>HTTP/1.1</multimapvalue>
        </multimapkey>
      </multimap>
      <multimap name="subject">
        <multimapkey name="fedoraRole">
          <multimapvalue>administrator</multimapvalue>
        </multimapkey>
        <multimapkey name="urn:fedora:names:fedora:2.1:subject:loginId">
          <multimapvalue>fedoraAdmin</multimapvalue>
        </multimapkey>
      </multimap>
      <multimap name="action"></multimap>
      <multimap name="resource"></multimap>
      <multimap name="recovery"></multimap>
    </context>
    <argument name="pid" type="string">demo:99</argument>
    <argument name="message" type="string">That dog's gonnna die.</argument>
    <argument name="force" type="boolean">false</argument>
  </JournalEntry>
</FedoraJournal>

...

Consuming the journal (click on image to enlarge).

Include Page
FEDORA36:_FC Wiki CopyrightFEDORA36:
_FC Wiki Copyright