Hi Gihan, At the moment that is the only available way to change a configuration.
you can use ServerConfigurationManager.applyConfiguration(File sourceFile, File targetFile, boolean backupConfigFile, boolean restartServer) to do this task. If you pass backupConfigFile as true it will backup the configuration and using restoreToLastConfiguration() method you can revert to the original file. Sample cone can is available at [1]. [1] https://github.com/wso2/product-apim/blob/master/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerConfigurationChangeTest.java Thanks and Best Regards, Saneth Dharmakeerthi Senior Software Engineer WSO2, Inc. Mobile: +94772325511 On Fri, Jun 5, 2015 at 6:25 PM, Gihan Anuruddha <gi...@wso2.com> wrote: > Hi Automation team, > > I have a configuration file which has below entry. Basically, I want to > set true for purging-enable and add table tags. One option is I can > maintain a copy and do a file copy and do the server restart. > Is there any other way to do this? > > <analytics-data-purging> > <purging-enable>false</purging-enable> > <purge-node>true</purge-node> > <cron-expression>0 0 0 * * ?</cron-expression> > <purge-include-table-patterns> > <table>.*</table> > <!--<table>.*jmx.*</table>--> > </purge-include-table-patterns> > <data-retention-days>365</data-retention-days> > </analytics-data-purging> > > ​Regards, > Gihan​ > > -- > W.G. Gihan Anuruddha > Senior Software Engineer | WSO2, Inc. > M: +94772272595 >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev