Child pages
  • Newspaper process monitor - release 1.9
Skip to end of metadata
Go to start of metadata

Newspaper process monitor

The processmonitor is a deployable meant to run inside a Tomcat.

Files

Service war file:

https://sbforge.org/nexus/content/repositories/releases/dk/statsbiblioteket/newspaper/process-monitor-frontend/1.9/process-monitor-frontend-1.9.war

Configuration

Deployment descriptor

<Context>
    <!-- Logback config loading -->
	<Parameter name="CONFIGDIR" value="path/to/dir/that/contains/logback.xml/" override="false"/>
    <!-- Application configuration -->
	<Parameter name="contextConfigLocation" value="file://${user.home}/path/to/ApplicationContext.xml" override="false"/>
</Context>

 

Logback.xml example

<configuration>
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/processMonitor.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- daily rollover -->
      <fileNamePattern>logs/processMonitor.%d{yyyy-MM-dd}.log</fileNamePattern>

      <!-- keep 30 days' worth of history -->
      <maxHistory>30</maxHistory>
    </rollingPolicy>

    <append>true</append>
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>
        
  <root level="INFO">
    <appender-ref ref="FILE" />
  </root>
</configuration>

 

Application configuration file

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

    <context:component-scan base-package="dk.statsbiblioteket.newspaper.processmonitor.backend"/>

    <bean id="sboi_config"
          class="dk.statsbiblioteket.medieplatform.autonomous.processmonitor.datasources.SBOIDatasourceConfiguration">
        <property name="summaLocation" value="http://achernar:58608/newspapr/sbsolr/"/>
        <property name="domsLocation" value="http://achernar:7880/fedora"/>
        <property name="domsUser" value="<doms user>"/>
        <property name="domsPassword" value="<doms pass >"/>
        <property name="domsPidGenLocation" value="http://achernar:7880/pidgenerator-service"/>
        <property name="domsRetries" value="3"/>
        <property name="domsDelayBetweenRetries" value="100"/>
    </bean>

    <bean id="mfPakConfig" class="dk.statsbiblioteket.newspaper.mfpakintegration.configuration.MfPakConfiguration">
        <property name="databaseUrl" value="jdbc:postgresql://achernar/mfpak-devel"/>
        <property name="databaseUser" value="<mfpak db user>"/>
        <property name="databasePassword" value="<mfpak db pass>"/>
    </bean>

    <bean id="sboi" class="dk.statsbiblioteket.medieplatform.autonomous.processmonitor.datasources.SBOIDatasource">
        <constructor-arg ref="sboi_config"/>
    </bean>

    <bean id="mfPak" class="dk.statsbiblioteket.newspaper.mfpakintegration.MfPakDataSource">
        <constructor-arg ref="mfPakConfig"/>
    </bean>

    <bean id="mfPakDAO" class="dk.statsbiblioteket.newspaper.mfpakintegration.database.MfPakDAO">
        <constructor-arg ref="mfPakConfig"/>
    </bean>

    <!--Reserved name for the data sources list-->
    <util:list id="enricherList" list-class="java.util.ArrayList">
        <ref bean="mfPakBatchEnricher"/>
        <ref bean="PagesDOMSBatchEnricher"/>
        <ref bean="DurationDOMSBatchEnricher"/>
    </util:list>

    <bean id="mfPakBatchEnricher" class="dk.statsbiblioteket.newspaper.processmonitor.backend.MfPakBatchEnricher">
        <property name="mfpak" ref="mfPakDAO"/>
    </bean>

    <bean id="PagesDOMSBatchEnricher" class="dk.statsbiblioteket.newspaper.processmonitor.backend.PagesDOMSBatchEnricher">
        <property name="fedora" ref="fedora"/>
    </bean>

    <bean id="DurationDOMSBatchEnricher" class="dk.statsbiblioteket.newspaper.processmonitor.backend.DurationDOMSBatchEnricher">
        <property name="fedora" ref="fedora"/>
    </bean>

    <bean id="mfPakBatchEnricher" class="dk.statsbiblioteket.newspaper.processmonitor.backend.MfPakBatchEnricher">
        <property name="mfpak" ref="mfPakDAO"/>
    </bean>

    <bean id="DOMSBatchEnricher" class="dk.statsbiblioteket.newspaper.processmonitor.backend.DOMSBatchEnricher">
        <property name="fedora" ref="fedora"/>
    </bean>

    <bean id="fedora" class="dk.statsbiblioteket.doms.central.connectors.EnhancedFedoraImpl">
        <constructor-arg name="creds"
                         type="dk.statsbiblioteket.doms.webservices.authentication.Credentials"
                         value="#{new dk.statsbiblioteket.doms.webservices.authentication.Credentials(sboi_config.domsUser,sboi_config.domsPassword)}"/>
        <constructor-arg name="fedoraLocation" value="#{sboi_config.domsLocation}"/>
        <constructor-arg name="pidGenLocation" value="#{sboi_config.domsPidGenLocation}"/>
        <constructor-arg name="thisLocation" value="#{null}"/>
        <constructor-arg name="maxTriesPut" value="#{sboi_config.domsRetries}"/>
        <constructor-arg name="maxTriesPost" value="#{sboi_config.domsRetries}"/>
        <constructor-arg name="maxTriesDelete" value="#{sboi_config.domsRetries}"/>
        <constructor-arg name="retryDelay" value="#{sboi_config.domsDelayBetweenRetries}"/>
    </bean>

    <!--Reserved name for the data sources list-->
    <util:list id="dataSourcesList" list-class="java.util.ArrayList">
        <ref bean="mfPak"/>
        <ref bean="sboi"/>
    </util:list>

    <bean id="statisticsService" class="dk.statsbiblioteket.newspaper.processmonitor.stats.StatisticsService">
        <property name="statisticsBaseUrl" value="http://achernar:7820/statistics/statistics.html?batchid="/>
    </bean>

</beans>

Changelog

Change log can be seen on github:

https://raw.github.com/statsbiblioteket/newspaper-digitisation-process-monitor/newspaper-digitisation-process-monitor-1.9/CHANGELOG.md

  • No labels