RISE to Bloome Software
Log In    
Home
RISE
Marshal
Download
 
 
r2bsoftware.se r2bsoftware.se
 
 
 
Click to hide navigation tree

The Marshal JDBC Router


The Marshal JDBC Router is a multithreaded, platform independent, Java middleware for accessing databases having a JDBC driver, such as Access, FileMaker, MySQL, PostgreSQL, SQL Server, Oracle, SQLite and many more.

Technically the router binds a connection socket to a tcp/ip address and port and listens for requests, and returns the result as JSON.

To start the Marshal JDBC Router, execute the statement below at your command prompt.

$ java -jar marshal-jdbc.jar

By default the router binds to the address 127.0.0.1 and port 8080. Binding to 127.0.0.1 ensures that only applications executed on the local server can access the router. The default read timeout, i.e. the time from when a connection socket is opened until the request in full has arrived to the router, is 30000 ms, and the default socket backlog is 50. In most cases there is no reason to change the default values of the socket backlog and the read timeout.

Executing the router using the following command line will cause the router to bind to the address 192.168.0.1, port 8181, having a socket backlog of 32 and a read timeout of 10000 ms. The backlog argument must be a positive value greater than 0. If the value passed is equal or less than 0, then the default value of 50 will be assumed. A read timeout of 0 indicates an infinite timeout.

$ java -jar marshal-jdbc.jar -h 192.168.0.1 -p 8081 -b 32 -t 10000

Harvest using the JDBC Router

When harvesting using Routers, the JSON TCP Harvester is used. In a Marshal point of view, apart from the Router specific properties, see below, harvesting using JDBC is identical to harvesting using the ODBC Harvester

The JDBC Router properties

Configuring the JSON TCP Harvester

Harvester
Name The name of the harvester in use by the selected Query-node. To change harvester, select the name property and click on the ellipsis button. Select the appropriate harvester in the form that is displayed.
Router
Connection String The JDBC connection string to use to connect to the source database.
For name Some JDBC drivers, e.g. FileMaker see image above, require dynamic loading of their classes in Java. Enter the name of the class to dynamically load.
Host The tcp/ip address on which the JDBC Router listens for connections.
Port The tcp/ip port on which the JDBC Router listens for connections.
Settings
Group by Optional group by clause for the sql query.
Order by Optional order by clause for the sql query.
Query Timeout The time in seconds to wait for a command to execute. The default is 30 seconds. A value of zero (0) specifies no limit to the wait time, instead of no wait time, and therefore should be avoided.
Table or View The name of the table, view or composed statement you want to harvest data from.
Where Optional where clause for the sql query.
User authentication
Password If user and password are supplied, they are used when connecting to the database.
User ID If user and password are supplied, they are used when connecting to the database.