Urs Beeli Messages: 561 Registered: October 2012 Location: Bern, Switzerland
I've tried to access some of the settings defined in the config.ini file of the server product (say org.eclipse.scout.rt.server.services.common.file.RemoteFileService#rootPath) but not found out how to do that.
What if I wanted to add arbitrary application specific configuration settings to the config.ini file that I would want to access?
In this case, you do not need the special pattern:
I think that this pattern is specific to Eclipse Scout. It is a good practice when you want to configure some parameter on a generic service (RemoteFileSerivce, SQL Service...). The advantage of having a such configuration in a config.ini file is that you can modify it during your deployment process (if you need to deploy for test and for production)
If you want a normal property: just use the pattern (like in any *.properties file)
If you extend an org.eclipse.scout.service.AbstractService and add a field with a setter and a getter you can use the myPackage.MyService#myFieldName=myValue style lines in the config.ini. For your own classes not extending AbstractService you can use ServiceUtility.injectConfigProperties(this) to inject the properties. You'd still have to have a field following the bean conventions.
EDIT: Or use the free style properties as Jeremie has explained.