Is it possible to use some sort of XML config file to set up the session when using the RFA API?
We will be hosting a service to request Market Data from Reuters on one of our UNIX boxes (could also host on a Windows box if needed) so would be nicer not to have to use the config editor
Yes, Java Preferences is a real detriment for most people. If you are are not aware: Java Preferences is what underpins the default configuration mechanism in RFA Java.
You have two options:
You can either use RFA's ConfigDb instead (see Context.initialize(ConfigProvider) method). But ConfigDb class will not give you sleek way to set your values from an XML file.
The better option in your case is to continue to use Java Preferences (=no changes to your application) but let your Java Preferences implementation be one that takes its values from XML files. Have a look at the Preferences2Go Project at GitHub. The front page contains a special note to Thomson Reuters RFA users. This method has the advantage that you can actually change an existing application without having the source code available. Or - if you do have the source - you can just use the method presented in this project. Your XML file format will be the same as the one used by Java Preferences, so you can use the RFA Config Editor to create your initial XML config file (just to get a quick start) and then never have to use the Config Editor again.
Hello @Ethan Wong
You can find the example source code of ConfigDb in section 9.3 Config Package of RFA Java Developer Guide
RFAJ provides config_loader.jar in <rfa package>/Tools to import RFA JavaXML config file into Java Preferences database for setting up RFA Session. For example:
java -jar config_loader.jar -file ../QuickStart/quickstart.xml
Note: quickstart.xml is an example of RFAJ configuration file shipped with RFA package for OMM interfaces
To export RFA configuration in Java Preferences database as an xml file, you can use config_exporter.jar as example below:
java -jar config_exporter.jar -user -path com -file rfaj_config.xml