dev@glassfish.java.net

AMX API: getting default values

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Wed, 06 Sep 2006 14:57:14 -0700

Hi Lloyd,

I have an issue using getDefaultValue() of AMXConfig and hope to have a
solution. In GUI, before the object is created, we need to show the
default value to the user on the creation wizard. But at this time, the
object is not created yet, i can't call the object's getDefaultValue().
One way maybe to create a 'temperory' object so that i can get its
default value, however, it means going through all the logic to ensure
that the name given to create this 'temp' object is unique.
Any suggestion to solve the problem ? or changes in AMX so that
default value is available always ?

We used to be able to invoke the method
getDefaultValues() of "com.sun.appserv:category=config,type=domain"
passing in the element we want the default value for, eg
'jdbc-connection-pool"
and it returns us the whole list of attributes with its default value.

Is it possible to provide something like this ?

thanks
Anissa.