Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# This configuration file should be placed in the FEWS region home directory in order for DAC to load it.
# Change the <region_name> to match name of actual region.
log4j.debug=true
log4j.rootLogger=INFO, DAC

# Define all the appenders
log4j.appender.DAC=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DAC.File=${catalina.base}/logs/DAC_<fews_home_dir>.log
log4j.appender.DAC.Append=true
log4j.appender.DAC.Encoding=UTF-8
# Roll-over the log once per day
log4j.appender.DAC.DatePattern='.'yyyy-MM-dd'.log'

Data Access Component

Copy the following two files to the <Tomcat_installation>/lib directory:

  • Dac.jar (provided by Deltares)
  • log4j-<version>.jar (retrieve from Fews-bin directory)

Now update the Tomcat server configuration file; <Tomcat_installation>/conf/server.xml as described below:

Add DacLifecycleListener
Between the element tags <Host> ... </Host> add the following lines:

Code Block

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
...
   <!-- Class that listens to Tomcat lifecycle events in order to shutdown DataAccessComponent -->
   <Listener className="nl.wldelft.fews.system.data.dac.DacLifecycleListener"  />
...
</Host>

Add DAC as 'global resource'
Between the element tags <GlobalNamingResources> ... </GlobalNamingResources> add the following lines (update where necessary):

Code Block

<!—
Definieer DAC global resource in het bestand server.xml. Paden moeten absolute zijn:
windows: d:/fews/bin of d:/fews/hhnk_da; linux: /fews/bin of /fews/hhnk_da
-->
<GlobalNamingResources>
...
<Resource name="global_resource_naam" auth="Container"
            type="nl.wldelft.fews.system.data.dac.DataAccessComponent"			
            factory="nl.wldelft.fews.system.data.dac.DacBeanFactory"
            regionHome="absoluut pad naar fews_home_dir" 
            binPath="absoluut pad naar fews_bin_dir" /> 

</GlobalNamingResources>