dev@glassfish.java.net

Re: domain.xml/hk2 broken

From: Justin Lee <justin.d.lee_at_oracle.com>
Date: Thu, 19 Aug 2010 11:30:07 -0400

  We can't use @NotNull because this element isn't always used. I like
the idea of not writing out defaulted *attributes* but not writing such
elements causes too many problems.

On 8/19/10 11:23 AM, Ludovic Champenois wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>