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

Compare with Current View Page History

« Previous Version 5 Next »

How to Set-up a Fews JDBC Server - Viewer for a FEWS LocalDataStore

Introduction

To be able to query timeseries directly using SQL statements Delft-Fews can be set up to act as a jdbc server. This can be done using an OC configuration (which will log in and automatically syncronise date with the MC, thereby assuring all data is constantly being updated, or by running this stand-alone. In the latter case the system will only export what is in the local datastore at startup.

Fews JDBC API

Installing a FEWS JDBC Server

Windows

Step 1: Install an OC

Step 2: Delete the "Log4jConfig.xml" from the "OC" directory. When starting the application a new "Log4jConfig-JdbcServer.xml" file will be generated for logging.

Step 3: Make a new "<OC-Name>_JDBC.exe" and "<OC-Name>_JDBC.jpif" file in the \bin directory. The "<OC-Name>_JDBC.jpif" must contain the following information.

..\jre
-mx512m
-cp
$JARS_PATH$
nl.wldelft.fews.jdbc.FewsJdbcServer
<OC-Name>_JDBC

Step 4: Start the FewsJdbcServer by clicking on the <OC-Name>_JDBC.exe. The Server will start as an OC and synchronise its localDataStore with the Central Database using the synchprofiles of an OC.

Step 5 Stop the FewsJdbcServer by killing the application using the System Monitor. In the attachements an exe is provided that opens a console window. If this console window is stopped, the FEWS JDBC driver process is also stopped.

Linux

Step 1: Install an OC

Step 2: Delete the "Log4jConfig.xml" from the "OC" directory. When starting the application a new "Log4jConfig-JdbcServer.xml" file will be generated for logging.

Step 3: Take the fews_jdbc.sh script file and place this one level higher than the \bin directory.

Step 4: Go to the directory where the ./fews_jdbc.sh script file is located and type ./fews_jdbc.sh <OC-Name>.

Step 5: Stop the FEWS JDBC service by typing exit in the console window where the JDBC startup script was executed. An other option is to kill the process of the FEWS JDBC service.

Example SQL queries

  • No labels