Hi zabayin,
If you only have one or two databases then having a couple of instances of jRDC running is no big deal.
Using different ports can also be handy if you want remote access to a db to be different from a local access.
I added the config file name as a command line argument do I can set the ports and queries for two different instances.
I can load 7200 40 field records to a remote connection over WiFi and it's virtually instantaneous.
I used the modded version of jRDC server made by
OliverA who added some stuff to make it work with sqLite
.
Modded jRDC Server by olivera for sqLite
If you want to start a server at boot I used the Task Scheuler with the following command lines:
Program/Script => W:\MyProgramFiles_W\Java_13_0_02\bin\javaw (Or you can use java in lieu of javaw if you want a windows command process
Arguments => -jar jRDC_sqLite.jar Port_17178_RemotePmon.properties
Start In => W:\MyProgramFiles_W\PowerMonProgs\pmonDB_uServerJRDC\jRDC_sqLite\jRDCv2_sqLite\Objects\
The file Port_17178_RemotePmon.properties is selected in this case and has the following contents:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.
#jRDC CONFIGURATION
#Be warned. A wrong IP address here will keep the server from starting correctly.
#IPAddress=192.168.1.148
#Java server port
ServerPort=17178
#DATABASE CONFIGURATION
#SQLite
DriverClass=com.sqlite.JdbcUrl
JdbcUrl=jdbc:sqlite:G:\\PSM_Server_DB\\psmdb_winSvr.db
#SQLite specific. Set CreateFile to create file if it does not exist.
CreateFile=False
#SQL COMMANDS
sql.getPwrDataLastRaw_0001=SELECT * FROM getPwrDataLastRaw_0010_View
sql.getPwrDataWithAlarmsLast_0001=SELECT * FROM getPwrDataWithAlarmsLast_0001_View
sql.getPwrDataLast_10_Stats=SELECT * FROM getPwrDataLast_0010_Stats_N2000_View
sql.getPwrDataWithAlarms_Raw_N7200_Ascn=SELECT * FROM getPwrDataWithAlarms_Raw_N7200_Ascn_View
sql.getPwrDataWithAlarmsStartEnd_NLimit7200=SELECT * FROM getPwrDataWitAlarmsRawWithTimeCrit WHERE julianDateUTC BETWEEN ? AND ? LIMIT 7200
You can see that the port is set at line 8.
With different ports you can use different firewall rules for each instance/port.
Have a look at the following post which I found helpful:
Additional Info
Best regards
Rob
Best regards
Rob