dev@glassfish.java.net

Re: adding attribute to 'cluster' element

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Fri, 28 May 2010 13:33:03 -0700

asadmin get "*" | grep -i gms



On 5/28/2010 12:37 PM, Bill Shannon wrote:
> 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?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188