dev@glassfish.java.net

Re: CLI Framework for JMX

From: Jane Young <Jane.Young_at_Sun.COM>
Date: Mon, 30 Oct 2006 00:38:40 -0800

Hi Jim,

This property element is not used in the code. It should be removed
from CLIDescriptor.xml.
Since the command class is generic (GenericCommand.java), this property
was to indicate the display messages like:
"List of resources:"
"<resource name> created successfully"
"<resource name> deleted successfully"
etc...

I changed the messages to be generic as well: "Command <command-name>
executed successfully."

I will remove the unused properties to avoid any confusion.

Jane




Jim Jiang wrote:

> Jane and Kedar,
>
> Thanks for your info!
> BTW,
> I have tried add my own command via admin-cli/framework, the
> experience is nice.
> The feature which invoke mbean methods directly via xml's element
> 'properties' is cool.
> another question related this,
> What's the meaning for below script with properties. I did not find
> any implementation for this:
> <property name="command-type">
> <value>list</value>
> </property>
>
> Thanks,
> Jim
>
>
> Jane Young wrote:
>
>> CLI Framework (admin-cli/framework) is compliant with Sun's CLIP
>> (Command Line Interface Paradigm) which is in the works of getting
>> Open Source'd.
>>
>>
>> kedar wrote:
>>
>>> Good question.
>>> One thing we should all know is the admin-cli/cli-api submodule is a
>>> generic
>>> JMX client that works independent of any implementation that uses it.
>>> For example, it is possible that you can direct the cli-api to any
>>> JMX compliant server and it will do its job perfectly all right.
>>>
>>> BTW, cli-api is not actively maintained. Talk to Lloyd Chambers
>>> (llc_at_dev.java.net)
>>> for details.
>>>
>>> admin-cli/commands is specifically geared towards GlassFish
>>> administration commands.
>>> The use of XML for declaring the command names obviously
>>> advantageous because it
>>> improves development time.
>>>
>>> There are some inherent differences in the above two ways and they
>>> have evolved
>>> differently over time. admin-cli/framework is used by commands
>>> module and provides
>>> some general purpose command parsing, environment variable support
>>> etc. in accordance
>>> with the schema of the XML that you refer to. In short, it can very
>>> well be
>>> used by any Java program to impart a *powerful* command line parsing
>>> support.
>>> Talk to Jane Young (janey_at_dev.java.net) about it.
>>>
>>> Kedar
>>>
>>>
>>> Jim Jiang wrote:
>>>
>>>> For admin-cli project, there are 3 packages: framework, commands,
>>>> cli-api.
>>>> In CLI-framework, an xml file was used for defining the commands.
>>>> / <Command name="list-domains"
>>>> classname="com.sun.enterprise.cli.commands.ListDomainsCommand"
>>>> numberofoperands="0" usage-text="list-domains [--terse=false]
>>>> [--echo=false] [--domaindir domain_directory]">
>>>> <ValidOption name="terse"/>
>>>> <ValidOption name="echo"/>
>>>> <ValidOption name="domaindir"/>
>>>> </Command>
>>>>
>>>> /But for JMX command, the command was defined as java method:
>>>> for example, com.sun.cli.jmx.cmd.DeleteCmd:
>>>> / getNumRequiredOperands() {
>>>> return( 1 );
>>>> }/
>>>> ...
>>>>
>>>> Could anyone give any explanation for why no different way used
>>>> for the command definition?
>>>>
>>>> Thanks,
>>>> Jim
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>