A Z M JANNAT UL KARIM Member Licensed User Longtime User Jul 21, 2019 #1 Hi, in somewhere on the forum I saw a way to make the config.properties file set as external so that every time I need to change, the compilation not required. Can anybody help me here. I know that it is unsafe, but it will work in local intranet. Thank you.
Hi, in somewhere on the forum I saw a way to make the config.properties file set as external so that every time I need to change, the compilation not required. Can anybody help me here. I know that it is unsafe, but it will work in local intranet. Thank you.
Erel B4X founder Staff member Licensed User Longtime User Jul 21, 2019 #2 It is not unsafe. The code that reads the configuration file is very simple: Code: Copy 'RDCConnector Private Sub LoadConfigMap As Map Return File.ReadMap(File.DirAssets, "config.properties") End Sub You can change it to load from a different folder. Upvote 0
It is not unsafe. The code that reads the configuration file is very simple: Code: Copy 'RDCConnector Private Sub LoadConfigMap As Map Return File.ReadMap(File.DirAssets, "config.properties") End Sub You can change it to load from a different folder.
A Z M JANNAT UL KARIM Member Licensed User Longtime User Jul 21, 2019 #3 Erel said: It is not unsafe. The code that reads the configuration file is very simple: Code: Copy 'RDCConnector Private Sub LoadConfigMap As Map Return File.ReadMap(File.DirAssets, "config.properties") End Sub You can change it to load from a different folder. Click to expand... Thank you Erel. So what I understand is if I modify the line with the following line and put the config.properties with the jar file that will solve the problem. Code: Copy Return File.ReadMap(File.DirApp, "config.properties") Also I want to change the file runtime without compiling jar file continuously. So I am activating DebugQueries = True. Hope everything will be Okay. Upvote 0
Erel said: It is not unsafe. The code that reads the configuration file is very simple: Code: Copy 'RDCConnector Private Sub LoadConfigMap As Map Return File.ReadMap(File.DirAssets, "config.properties") End Sub You can change it to load from a different folder. Click to expand... Thank you Erel. So what I understand is if I modify the line with the following line and put the config.properties with the jar file that will solve the problem. Code: Copy Return File.ReadMap(File.DirApp, "config.properties") Also I want to change the file runtime without compiling jar file continuously. So I am activating DebugQueries = True. Hope everything will be Okay.
jcohedman Member Licensed User Longtime User Oct 2, 2019 #6 excuse my ignorance, but, does it means that jRDC.jar "reads" config.properties continuosly? Upvote 0
OliverA Expert Licensed User Longtime User Oct 3, 2019 #7 jcohedman said: excuse my ignorance, but, does it means that jRDC.jar "reads" config.properties continuosly Click to expand... When DebugQueries is True (see the code in the RDCConnector class module of the jRDC2 source), then for every call to the jRDC2 server, the config.properties file is read anew. This way if you update/delete/add new SQL queries to the config.properties file, they will be effective without having to stop/start the jRDC2 server. Please note: 1) In order for this to work, your config.properties file must be located outside of the asset directory (what this thread dealt with originally). 2) This only affects the SQL statements within the config.properties file. Anything else (DriverClasss, JdbcUrl, anything that does not start with sql.) that is changed will still require a stop/start of the jRDC2 server. Upvote 0
jcohedman said: excuse my ignorance, but, does it means that jRDC.jar "reads" config.properties continuosly Click to expand... When DebugQueries is True (see the code in the RDCConnector class module of the jRDC2 source), then for every call to the jRDC2 server, the config.properties file is read anew. This way if you update/delete/add new SQL queries to the config.properties file, they will be effective without having to stop/start the jRDC2 server. Please note: 1) In order for this to work, your config.properties file must be located outside of the asset directory (what this thread dealt with originally). 2) This only affects the SQL statements within the config.properties file. Anything else (DriverClasss, JdbcUrl, anything that does not start with sql.) that is changed will still require a stop/start of the jRDC2 server.
jcohedman Member Licensed User Longtime User Oct 3, 2019 #8 OliverA, you know what are you talking about... Thanks! Upvote 0