dev@glassfish.java.net

Re: domain.xml/hk2 broken

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Thu, 19 Aug 2010 08:23:34 -0700

On 8/19/10 8:16 AM, Ludovic Champenois wrote:
> On 8/19/10 8:10 AM, Justin Lee wrote:
>> The practice of not writing out elements whose attributes are all
>> default values (essentially empty nodes) breaks thing silently. If I
>> create a protocol then create the nested element "http-redirect" with
>> default values, the <http-redirect> is not written out to
>> domain.xml. However, it remains visible in memory so that subsequent
>> attempts to create that same element fail properly. When restarting
>> glassfish, that element does not exist in the document and is not
>> recreated in memory on restart thereby breaking the configuration.
>> We need to have that feature rolled back. I can file an issue
>> against this with these details, I just need to know if I should file
>> against glassfish or hk2. But it's definitely a problem.
>>
> hk2.
> We should keep the feature, but fix the bug: having a child element is
> not the default setting, so this setting should be stored, even if all
> the attributes of the parent are default, the @Element side is not
> default...
Correction, wrong analysis...I thought the protocol was not written...
Nesd @NOTNULL?
Ludo