admin@glassfish.java.net

Re: operands for CLI commands

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Tue, 24 Jun 2008 18:33:56 -0700

Jane,

Thanks.

Same results with:
List<String> expr;
String[] expr;

Lloyd

On Jun 24, 2008, at 6:28 PM, Jane Young wrote:

> Hi Lloyd,
>
> Can you try using List instead of String array?
> @Param(primary=true)
> List<String> expr;
>
> Also, I'm wondering by assigning {"*"}, it's defining expr to be an
> one element String array. Can you try removing the String array
> assignment?
>
> @Param(primary=true)
> String[] expr;
>
> In the code, check if expr.length()=0, then default it to "*".
> Let me know if this works.
>
> HTH,
> Jane
>
>
> Lloyd L Chambers wrote:
>
>> Jane,
>>
>> How do I get multiple operands for asadmin CLI commands? It seems
>> to "eat" all but the last operand:
>>
>>
>> @Param(primary=true)
>> String[] expr = {"*"};
>>
>>
>> dhcp-usca14-132-206:amx-impl lloyd$ asadmin get a b c
>> Invocation of GetCommand
>> Parameters
>> c
>> AMXCommand "get" executed successfully at: Tue Jun 24 15:56:40 PDT
>> 2008
>>
>> Command get executed successfully.
>>
>> ---
>> Lloyd L Chambers
>> lloyd.chambers_at_sun.com
>> Sun Microsystems, Inc
>>
>>
>>
>

---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc