Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor changes to layout

...

  • JobScheduler Database Connection:
    • /resources/joc/jobscheduler.hibernate.cfg.xml
  • Reporting Database Connection:
    • /resources/joc/reporting.hibernate.cfg.xml
  • The following listing shows a typical hibernate database configuration file (here for the JobScheduler database connection)

    Code Block
    languagetextxml
    titleExample Listing of jobscheduler.hibernate.cfg.xml
    linenumberstrue
    collapsetrue
    <?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">js_11_pass</property>
      <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/js_11_db</property>
      <property name="hibernate.connection.username">js_11_user</property>
      <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
      <property name="hibernate.show_sql">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>
      <property name="hibernate.c3p0.minPoolSize">1</property>
      <property name="hibernate.c3p0.maxPoolSize">1</property>
      <property name="hibernate.c3p0.initialPoolSize">1</property>
      <property name="hibernate.c3p0.acquireIncrement">1</property>
      <property name="hibernate.c3p0.maxIdleTime">14400</property>
      <property name="hibernate.c3p0.maxConnectionAge">14400</property>
      <property name="hibernate.c3p0.idleConnectionTestPeriod">16200</property>
     </session-factory>
    </hibernate-configuration>

...

Code Block
languagetext
titleExample Listing of jobscheduler.hibernate.cfg.xml
linenumberstrue
collapsetrue
log4j.reset=true
log4j.rootLogger=info, stdout
#for debugging JOC set the following logger to 'debug'
log4j.logger.com.sos = info
log4j.logger.org.hibernate.SQL = info
#logger for audit log
log4j.logger.JOCAuditLog=info, audit
log4j.additivity.JOCAuditLog = false

log4j.logger.org.apache.shiro = info
log4j.logger.org.hibernate.hql = error
log4j.logger.org.hibernate.event = error
log4j.logger.org.hibernate.cfg = error
log4j.logger.org.hibernate.type = error
log4j.logger.org.hibernate.id = error
log4j.logger.org.hibernate.orm.deprecation = error
log4j.logger.org.apache.http = error
log4j.logger.org.apache.commons = error
log4j.logger.org.apache.shiro.session.mgt = error
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.EnhancedPatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601}{Europe/Berlin} %-5p %-16.16t %-44.70c{1.} - %m%n%throwable{6}
log4j.appender.audit = org.apache.log4j.FileAppender
log4j.appender.audit.layout = org.apache.log4j.EnhancedPatternLayout
log4j.appender.audit.layout.ConversionPattern = %d{ISO8601}{Europe/Berlin} %-5p %m%n%throwable{short}
#filename of audit log
log4j.appender.audit.File = ${jetty.base}/logs/JOCAuditLog.log

...