dev@glassfish.java.net

Re: AMX API: getting default values

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 07 Sep 2006 07:47:09 -0700

Anissa,

Yes, we could provide the following:

/**
    @ return a Map keyed by Attribute name of all the default
Attribute available for the specified j2eeType,
       with the value being the actual value (not an Attribute).
      Available for {_at_link #GROUP_CONFIGURATION} MBeans only.
  */
Map<String,String> getDefaultValues( final String j2eeType );

On Sep 6, 2006, at 2:57 PM, Anissa Lam wrote:

> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>