dev@glassfish.java.net

Re: adding attribute to 'cluster' element

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 28 May 2010 12:37:27 -0700

Bobby Bissett wrote on 05/28/10 12:11 PM:
> Hi all,
>
> I'm stuck as to how to add an attribute to this element. Or, really, any
> element. When a 'cluster' element is created during "asadmin
> create-cluster <foo>" we'd like to add:
>
> gms-enabled="true"
>
> I've added this to Cluster.java in the config-api module (comments
> omitted here):
>
> @Attribute (defaultValue="true",dataType=Boolean.class,required=true)
> String getGmsEnabled();
>
> void setGmsEnabled(String value) throws PropertyVetoException;
>
> But when the element is created in domain.xml, the attribute is missing.
> I see the proper default value in the instance object in
> Cluster.Decorator, but then it's gone. Can someone tell me what I'm
> missing?

I believe that, normally, default values simply aren't stored in domain.xml.
The getGmsEnabled method should return the correct default, does it?