Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Usage of Java system properties within Riena

Personally I'm not very happy with the system properties.

>From my POV a configuration mechanism should:

1. make it easy to discover configuration flags. There should be an
obvious location where to find them. System properties scatter / hide
it in Java code, so it does not fulfill that
2. allow for modularity / different bundle sets. This rules out having
ONE central place since this is not modular
3. make it possible to change a configuration value without modifying Java code
4. make it easy to read documentation about the configuration value
when it is defined
5. make it easy to access the value from java -- avoid complex parsing
6. make it hard to have naming conflicts

My current favourite is the
"org.eclipse.core.variables.valueVariables" extension point, which we
are already using. It satisfies 1,2,4,5 well and 3 somewhat
(plugin.xml). Below is an example taken from Riena. I'm sure Stefan
known more details.

org.eclipse.riena.communication.sample.pingpong.client.config/plugin.xml:
	<extension
		point="org.eclipse.core.variables.valueVariables">
		<variable
			description="Name of the host to connect to"
			name="riena.hostname"
			readOnly="true"
			initialValue="localhost:8080"/>
	</extension>

String hostName = VariableManagerUtil.substitute("${riena.hostname}");
// localhost:8080

I also would be interested to hear about the pros / cons of the
AdminService suggested by Scott, since I don't know anything about it.

Kind regards,
Elias.



On Wed, Jul 1, 2009 at 4:33 AM, Stefan Liebig<Stefan.Liebig@xxxxxxxxxxxx> wrote:
> Hi,
>
> I would like to start a discussion about the usage of Java system
> properties. I tried to collect all the system properties that are currently
> used within Riena. And I must admit that I was not aware of that many system
> properties we have.
> My effort is documented here:
> http://wiki.eclipse.org/Riena_System_Properties#Riena_System_Properties
>
> Thoughts that come into my mind:
> - are system properties the "right" way?
> - if we have them they should follow some pattern and should be documented
> - are their alternatives?
> - what are your experiences?
>
>
> Stefan
>
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
>



-- 
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | http://eclipsesource.com


Back to the top