You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Site Under Construction by Santiago Aucejo Petzoldt

Requirements

  • a database connection
    A database connection to the database which holds the transfer history has to be configured.
  • a JobScheduler with the Job Chains to fill the transfer history tables of the database (not deployed with this setup)

Installation

There are two ways to install the JADE Background Service History Viewer.

  • Install the JADE Background Service History Viewer with a preconfigured jetty.
  • Install the JADE Background Service History Viewer in your own webservlet container.

After selecting the install path you are prompted to decide wether you want to install the JADE Background Service History Viewer with a preconfigured jetty or to use and already installed servlet container.

Installation with a preconfigured Jetty

To install the JADE Background Service History Viewer, check the checkbox. The textfield to choose a path will disapear and a textfield to insert the port for Jetty will be shown.

Insert the port you want to use and click .

In the next step you will be prompted to choose the database you use and then to insert the credentials to the database for the database connection.

After the installation process has finished a new service is installed and active. The name of the service is "SOS JadeHistoryViewer" (Windows) or "jadehistoryviewer" (Linux) respectively.

Now you can use the JADE Background Service History Viewer with your Browser under the address http://[HOSTNAME]:[PORT]/JadeHistoryViewer.

Installation in your own webservlet container

During the installation process you will be prompted to

  • configure the path to where the war file of the webapplication will be stored.
  • configure the credentials for the database connection to the database holding the data of the transfer history.

The war file will be stored in the configured path and holds the configured database connection credentials.

To configure the web application in your own servlet container properly please refer to the documentation of your servlet container.

To reinstall a newer Version of the webapplication use this option, too.

Configuration Files

The war file jadeHistoryViewer.war contains some configuration files, which are updated during setup.

PfadDateiVerwendung
/WEB-INF/classeslog4j.propertieslog4j configuration to log with log4j
/WEB-INF/classeslogback.xmllogback configuration to log with logback
/WEB-INF/classeshibernate.cfg.xmldatabase configuration file

hibernate.cfg.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property>
<property name="hibernate.connection.password">DBPASSWORD</property>
<property name="hibernate.connection.url">jdbc:mysql://DBHost:DBPort/DBName</property>
<property name="hibernate.connection.username">DBUSERNAME</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
<property name="javax.persistence.validation.mode">none</property>
<mapping class="sos.ftphistory.db.JadeFilesDBItem"/>
<mapping class="sos.ftphistory.db.JadeFilesHistoryDBItem"/>
</session-factory>
</hibernate-configuration>

This configuration will be updated with the credentials specified during the setup routine.

log4j.properties example

# Set the log level of the root logger to WARN
log4j.rootLogger=DEBUG, consoleAppender, fileAppender
# Direct log messages to the console
log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
# Direct log messages to a file
# Set the file appender to a rolling file appender with a date configuration
log4j.appender.fileAppender=org.apache.log4j.DailyRollingFileAppender
# Set the type of the pattern layout to EnhancedPatternLayout to display local timezone
log4j.appender.fileAppender.layout=org.apache.log4j.EnhancedPatternLayout
# Set the pattern layout
log4j.appender.fileAppender.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm:ss,SSS Z}]: [%t] (%F:%L) - %m%n
# Set the output file an its path
log4j.appender.fileAppender.File=${PATH_SET_BY_SETUP}/JadeHistory.log
# Set the append to true, should not overwrite
log4j.appender.fileAppender.Append=true
# Set the immediate flush to true
log4j.appender.fileAppender.ImmediateFlush=true
# Set the threshold to debug mode
log4j.appender.fileAppender.Threshold=debug
# Set the date pattern when the rollover should happen (daily at midnight)
log4j.appender.fileAppender.DatePattern='.'yyyy-MM-dd

This configuration is used for log4j logging and stores the log files to the  ${PATH_SET_BY_SETUP}. 

logback.xml example

<configuration debug="true">
<property name="PATH_FOR_LOGFILES" value="${PATH_SET_BY_SETUP}"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-5level [%d{yyyy-MM-dd HH:mm:ss.SSS}]: [%thread] %logger [%file:%line] - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${PATH_FOR_LOGFILES}/JadeHistoryViewer.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${PATH_FOR_LOGFILES}/JadeHistory.%d.log</fileNamePattern>
<!-- keep 7 days' worth of history -->
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>[%-5level] [%d{yyyy-MM-dd HH:mm:ss.SSS}]: [%thread] %logger [%file:%line] - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>
</configuration>

This configuration is used for logback logging and stores the log files to the  ${PATH_SET_BY_SETUP}. 

  • No labels