[jboss-dev-forums] [Design of Management Features on JBoss] - Re: JBAS-6672, null values and defaults
scott.stark@jboss.org
do-not-reply at jboss.com
Thu Apr 2 11:15:10 EDT 2009
"charles.crouch at jboss.com" wrote : "emuckenhuber" wrote : Although i still think doing managedProperty.setValue(null); should not replace it with a default value.
| |
|
| Ok, so what should we use?
|
I think we are going to have to use the ManagedProperty.setRemoved(true) to indicate that a property has no value to be applied to the underlying metadata. If we don't want to persist the default values, I don't see that a default value at the ManagedProperty level has much meaning. It would not be equivalent a missing element on an xml configuration. I suppose we could treat it like that to ensure the uninitialized values are part of the management interface, and the persistent view would have a 'managed-property default=true' setting. The main problem I see with this vs using ManagedProperty.setRemoved(true) is having to update the ManagedProperty settings to reflect the proper default values.
A ManagedProperty.setValue(null) should only be mapping to either an actual null or an uninitialized value for a primitive. I agree with Emanuel that we can't effectively duplex the meaning of a null to indicate a missing configuration value.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223055#4223055
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223055
More information about the jboss-dev-forums
mailing list