So I was running the RFA progarms in the examples and I had to use the RFA Configuration Editor to create the Connection and sessions as set in the tutorial.
My question is : what does the config editor do that enables the RFA applications to be read the correct configurations ? Is it updating the windows registry which are then read by the RFA api internally ? Is it setting up systems variables on my host ? I do not see any RFA system variables when I do a set command on my windows console.
Also , how do I use the editor on a server environment like Linux server ? There must be a way for exporting the config created by the editor in a windows host and directly feed the config file to an RFA application without requiring to use the Config Editor explicitly ?
Basically, RFA Java uses the Java Preferences API for managing the RFA configuration. The Java Preferences API uses different backing storage for different OS platforms. The configuration data is stored in windows registry on Windows, and in flat files on Unix/Linux (as Zoya mentioned above). Note that Java Preferences API does not use system properties for storing the configuration data.
For graphical enviroment like Windows, the GUI-based Config Editor is easy to use and recommended for setting up the RFA configuration. For terminal-based environment like Linux, command-line based tools, i.e. config_loader.jar, config_exporter.jar, and config_remover.jar, which comes with RFAJ packages in \Tools, can be used to import from an XML file, export to an XML file, and remove the configuration tree, respectively.
To setup the RFA configuration on Linux, you may export the RFA configuration setup on Windows to an XML file using the Config Editor tool (selecting File > Export), and then import the exported file using the command-line based config_loader program. Alternatively, the application can also use Java Preferences API method, i.e. Preferences.importPreferences(file) to import an XML configuration file from a specified path during startup.
Alternate to storing configuration data on backing-storage of OS, you may consider populating the RFA configuration database in-memory at runtime by using the RFA library class named ConfigDb, as suggested by Steven. This would allow the application to maintain the configuration consistently across platform without using windows registry or flat files, which some users may not have the permission to access.
Yes, on windows, Configuration Editor stores configuration tree into windows registry, under HKEY_CURRENT_USER/software/JavaSoft/Prefs.
Under linux, the editor stores preferences into .java/.userPrefs
Yes, one can export into XML file and then import using Config Editor, File->Export/File->Import.
Yes, one can generate the configuration tree in code, but using the config tool is recommended, as introducing a typo in config code is very easy and can be time-consuming to figure out.
Java has its little known own configuration database but is very inconvenient to use, it is highly recommended to avoid this and use the programmatic interface to the RFA configuration database (com.reuters.rfa.config.ConfigDb) instead. You then have the option of implementing your own Json, Xml or Java properties wrapper around that.
Note that implementing cross-platform RFA configuration is challenging as each API itself is implemented differently. I prefer the "/" slash paths of RFA/C++ to RFA/Java.