dev@glassfish.java.net

Re: target as option or operand?

From: Cheng Fang <cheng.fang_at_oracle.com>
Date: Fri, 25 Jun 2010 22:22:15 -0400

On 6/25/10 8:58 PM, Hong Zhang wrote:
> Hi, Cheng
>> I noticed some commands take target operand, and others take target
>> options. What's the rules for providing target value?
>>
>> For ex:
>>
>> asadmin list-components --target cluster1 (Failed as option)
>> Invalid option: --target
>>
>> asadmin list-components cluster1 (Passed as operand)
>> Command list-components executed successfully on server instance
>> instance1
>> Command list-components executed successfully on server instance
>> instance2
> Yes, I have implemented the list-components command to be v2 backward
> compatible (though like Bill I am not sure why it was operand instead
> of an option).
>> (The doc says for list-components, the target operand is deprecated
>> and ignored. But it turns out it's still significant)
> Where do you see this? We should change this to say the same thing as
> v2 doc as we are implementing the same way.
>

V3 reference manual:
http://docs.sun.com/app/docs/doc/820-7701/list-components-1?l=en&a=view

and asadmin help page in 3.1 and 3.0.1:

GF3.0.1/bin > asadmin list-components --help displays:
... ...
OPERANDS
      target

          Do not specify this option. This option is retained for
          compatibility with other releases. If you specify this
          option, a syntax error does not occur. Instead, the

Java EE 6 Last change: 14 Sep 2009 1

          subcommand runs successfully and the option is silently
          ignored.

-cheng
> Thanks,
>
> - Hong
>>
>>
>> asadmin list-jndi-resources --target cluster1 (Passed as option)
>> Command list-jndi-resources executed successfully on server instance
>> instance1
>> Command list-jndi-resources executed successfully on server instance
>> instance2
>>
>> asadmin list-jndi-resources cluster1 (Failed as operand)
>> Command list-jndi-resources does not accept any operands
>>
>> Thanks,
>> -cheng
>>
>> ---------------------------------------------------------------------
>> 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
>