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

+1 for Elias suggestions

from my POV - OSGI Admin Services or
org.eclipse.core.variables.valueVariables
are good choices. But there should be a graphical frontend to manage the configuration

The OSGI Admin Service is great and very flexible, but there's some kind of learning curve.
pros of OSGI Admin Service:
- configuration commands can be added to OSGI console
- Management agents can provide a graphical UI to explore / change configurations (per ex Knopflerfish)


ekke

Elias Volanakis schrieb:
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

    


  


--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@xxxxxxxxxxxxxxxx
homepages (de): http://ekkehard.org || http://gentz-software.de
blog (en): http://ekkes-corner.org
blog (de): http://ekkes-ecke.org
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


Back to the top