[jboss-as7-dev] Default values in the model

Heiko W.Rupp hrupp at redhat.com
Fri Jul 29 05:50:51 EDT 2011


Am 29.07.2011 um 11:34 schrieb Emanuel Muckenhuber:
> Yes, this is the case i mean. If you you do a 
> read-resource(defaults=true) - you get a model with all the default 
> values. If you then just write all attribute we would have to add some 
> sort of check not that we end up storing a default value in the model again.

Until today I was thinking the defaults in :read-resource-description would be 
enough ("descriptive") and more or less serve for clients to look up what the default
would be. I am for example using that information to populate our metadata (plugin-descriptor).
I would have thought, those values correspond to constants in the code for the defaults.

Having those defaults in read-resource and read-attribute suggests that they are not constant?

But then for us it is a minor difference if we get the metadata from read-resource-description or
read-resource.

For a user that is not using a console to talk to AS, but e.g. curl, it may feel strange that if e.g.
the default value for an attribute is 2, that if he stores '3', read-attribute will return 3, but if he then
stores '2' again, he will get "undefined", which means "default is used".

Of course the storage internally in AS7 can be whatever you like.


We also had a discussion in the past about reading "effective configurations" - meaning that 
for e.g. jvm info there could be domain/profile/sg wide settings, then per host and then per managed
server - it should be possible to go to a managed server and say "give me your effective config" and this
would grab all the values from domain/profile/...  and show them explicitly instead of returning "undefined",
which means "go to the higher level entity to find out what this may be".
In this case it would be good not to fall back to any "undefined" / "default" values, but rather to explicitly return
the values -- even if they turn out to be the default.


   Heiko






More information about the jboss-as7-dev mailing list