admin@glassfish.java.net

Invoking a command from a command

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Thu, 03 Jun 2010 13:00:22 -0700

I'm looking for a little push in the right direction.
If there are existing commands that do this feel free
to point me at them.

Case 1
------
I have a remote command that as part of it's processing
wants to invoke another remote command. For example
start-cluster will likely loop through the instances
and call start-instance on each instance.

What is the suggested way to have a remote command
execute another remote command locally? Seems like I
want a variation of enterprise.admin.cli.remote.RemoteCommand
that operates directly on the command class (instead
of remotely over HTTP).

Case 2
-------
Same as Case 1 except I want to call a local command.
For example start-instance may want to call
start-local-instance if the instance is local to the DAS.

Thanks,

Joe