dev@glassfish.java.net

Re: adding attribute to 'cluster' element

From: Bhakti Mehta <bhakti.mehta_at_sun.com>
Date: Fri, 28 May 2010 14:14:26 -0700

I think you need to add @Param in the Cluster and the decorator too. See
if that will help. For more details you can see the configRef in
CLuster.java
Regards,
Bhakti

Byron Nevins wrote:
> 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
>>
>