dev@glassfish.java.net

Re: bump: Re: adding a property to an element in domain.xml?

From: Jerome Dochez <jerome.dochez_at_oracle.com>
Date: Thu, 17 Jun 2010 13:03:09 -0700

On 6/17/10 1:00 PM, Jerome Dochez wrote:
> I don't quite understand what you need to do but isn't this what you
> want from inside the decorator :
>
> Propert prop = cluster.createChild(Property.class);
and of course
prop.setName(xxx);
prop.setValue(yyy);
>
> cluster.getProperty().add(prop)

>
>
> On 6/17/10 12:49 PM, Bobby Bissett wrote:
>> To meet our M2 goal, I could just promote these props to attributes.
>> Anyone? Anyone?
>>
>> None of the examples I can find do this. It's not like I'm adding a
>> child element (the list is already there), I can't find an example of
>> a Property being created to add one manually. I'm running out of
>> things to try....
>>
>> On Jun 17, 2010, at 1:23 PM, Bobby Bissett wrote:
>>
>>> Hi all,
>>>
>>> In Cluster.java I've added the property descriptor info to the
>>> property child element:
>>>
>>> @ToDo(priority=ToDo.Priority.IMPORTANT, details="Complete
>>> PropertyDesc for legal props" )
>>> @PropertiesDesc(props={
>>> @PropertyDesc(name="TCPSTARTPORT", defaultValue = "9090",
>>> description = "GMS listener port range start value"),
>>> @PropertyDesc(name="TCPENDPORT", defaultValue = "9120",
>>> description = "GMS listener port range end value")
>>> })
>>> @Element
>>> @Param(name="properties", optional=true)
>>> @Override
>>> List<Property> getProperty();
>>>
>>> But in the decorator called during "asadmin create-cluster <name>" I
>>> get the list and see no properties in it. Can someone tell me what I
>>> need to do to have these properties created?
>>>
>>> More importantly, I need to change the values in the decorator to
>>> something including the cluster name, which isn't known of course
>>> till runtime. If I need to add a property whose value isn't known
>>> until runtime, is the above even the correct way to do it (declare
>>> it on the element and then change it)? I could not figure out how to
>>> create a new Property object to add to the list in the decorator.
>>>
>>> Thanks,
>>> Bobby
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>