...
The JDBC Interface provides a virtual access to (virtual) FEWS tables. The JDBC server allows a client application to query the available tables. However not all SQL query statements are supported. Also the type of SQL statements allowed on a table varies per table. See the section on #SQL queries for more details.
Fews JDBC data model
The following information is available through the JDBC Server:.
Fews JDBC data model
Locations
The locations table allows the client application to query the available FEWS locations.
...
- Make sure you add the vjdbc.jar and commons-logging-1.1.jar file to the classpath
- The url is: jdbc:vjdbc:rmi://<host>:2000/VJdbc,FewsDataStore (under <host>, enter the machine's IP or server name where the fews jdbc FEWS JDBC application runs)
When the FEWS JDBC application runs you can test the connection using the Test button.
Anchor | ||||
---|---|---|---|---|
|
JDBC server at client application
It is possible to have every client application (OC) to have also its own JDBC service.
Therefore you need to configure in systemConfigFiles\Explorer.xml a piServicePortRange. If configured, the OC automatically starts the JDBC service at the localhost.
Code Block | ||||
---|---|---|---|---|
| ||||
<piServicePortRange start="2000" end="2001"/>
|
If a port number in the configured range is not available anymore, the service will not start.
You will see messages in the log panel like:
Code Block |
---|
INFO - FewsJdbcServer.init - JdbcServer.Info: version: 2011.02, build: 34718 Apr3, type: stable, jre: 1.6.0_29, mx: 518m, db: Firebird, region: ....
INFO - Log4JLogger.info - Starting RMI-Registry on port 2000
INFO - Log4JLogger.info - Binding remote object to 'VJdbc'
INFO - FewsJdbcServer.run - JDBC server started at <localhost>:2000
|
This can be used to make it possible that other programs use the JDBC service directly from the client PC.
Example SQL queries
There are a number of SQL queries that can be used to retrieve data from the database. Only (read-only) statements are supported. Statements must be formatted as:
...