dev@glassfish.java.net

adding a property to an element in domain.xml?

From: Bobby Bissett <bobby.bissett_at_oracle.COM>
Date: Thu, 17 Jun 2010 13:23:17 -0400

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