question

Upvotes
Accepted
15 5 4 9

Can we set up an RFA Session without using the Config Editor?

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

treprfarfa-apijavaconfigurationsession
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
1.5k 3 5 7

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Ah I see, thanks for the help !

So would using the ConfigDb be the best way forward? (also, is there documentation on usages of ConfigDb)?

As mentioned: if you use ConfigDb then you have to write some code yourself to read from XML file into your ConfigDb object. If using Preferences2Go you'll get that part for free.

Upvote
9.5k 10 5 7

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
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

This is indeed a third option. Must admit I wasn't aware of it. There are two things to note about this solution:

  1. You'll have execute the above command every time you start your application. It will take whatever is in your XML file, it won't properly sync nodes, just overwrite what is already there.
  2. It still uses the classic Java Preferences backingstore so you've essentially accomplished nothing, IMO. Your application will still be subject to mysterious backingstore errors and the true source for the config will still be what is in Registry/Hidden files, not what is in your XML file.
Click below to post an Idea Post Idea