yungsters/rain-workload-toolkit — pull request #15 by sguazt (2013-11-10 14:09:43+00:00)
Title: [core] Load configuration files from file system first, then as resource

Hello,

Currently, in RAIN the configuration file (passed as command line argument) is first loaded as a resource

ClassLoader.getSystemClassLoader().getResourceAsStream

and, if not found, it is loaded from the file system

ConfigUtil.readFileAsString

With this patch, I suggest to invert the priority, that is I suggest to give higher priority to the configuration file stored in the file system.

The rationale for this is that the JAR always store its configuration files.
However, such files are the ones you have at *compilation time*.
If you want to change your configuration *after* compilation time (e.g., you want to experiment with different traffic mix, or with different number of users), currently you have no way but to change the configuration file and the recompile.
Instead, if we give higher priority to configuration files stored in the file system, we can avoid the recompilation step.
Just change the configuration file, and run RAIN.

Thus, this patch makes RAIN to first load configuration from file system, and then from the resources.

Please, consider to merge this patch.

Best,

-- Marco