dev@glassfish.java.net

Re: target as option or operand?

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 25 Jun 2010 16:10:32 -0700

Someone with more history should probably answer as to whether there
was an original design here. It's always felt to me like it was random.

The closest I've been able to come up with is that --target is just
a qualifier to what you're doing, but you're operating on something
else. When the target is an operand (e.g., create/start/stop-instance,
create/start/stop-cluster, etc.), it's actually the thing you're
operating on.

But that doesn't explain the many "list" commands that take a target
as an operand. I would've expected the operand to be the name(s)
of the things you're listing.


Cheng Fang wrote on 06/25/10 03:15 PM:
> 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
>
> (The doc says for list-components, the target operand is deprecated and
> ignored. But it turns out it's still significant)
>
>
> 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
>