In the latest version, how to read EMAconfig.xml from custompath instead of current directory?
Hello @sagar.s
In EMA Java, you can use EmaFactory.createOmmConsumerConfig(java.lang.String)to specify your custom path which EMAconfig.xml is in as explained in Elektron-SDK1.1.1.java.eload/Ema/Docs/refman/emajava/com/thomsonreuters/ema/access/EmaFactory.htmlshown below:
For example: To read EMAconfig.xml in thefolder C:\myEMAProjects, an example snipped source code in EMA javaapplication is:
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig("C:\\myEMAProjects").consumerName("Consumer_2"));
EMA C++ also provides the same feature in OmmConsumerConfig(EmaString). An example snipped source codeis:
OmmConsumer consumer( OmmConsumerConfig("C:\\myEMAProjects").consumerName( "Consumer_2" ) );
For the complete applications, please referto
EMA Java: example111__MarketPrice__UserSpecifiedFileConfig
EMA C++: 111__MarketPrice__UserSpecifiedFileConfig