I've written this, packaged it, and it's in the modules dir. What do I
need to do to make asadmin aware of my command?
---begin code---
package org.glassfish.gms.admin;
import com.sun.enterprise.admin.cli.CLICommand;
import org.glassfish.api.admin.CommandException;
import org.jvnet.hk2.annotations.Scoped;
import org.jvnet.hk2.annotations.Service;
import org.jvnet.hk2.component.PerLookup;
import javax.swing.JOptionPane; //temp
/**
* asadmin local command that wraps the multicast validator tool
* in shoal-gms-impl.jar
*/
@Service(name="validate-multicast")
@Scoped(PerLookup.class)
public class ValidateMulticastCommand extends CLICommand {
@Override
protected int executeCommand() throws CommandException {
JOptionPane.showMessageDialog(null,
"Yay, you found me");
return 0;
}
}
---end code---
---begin output---
hostname% asadmin validate-multicast --verbose
Remote server does not listen for requests on [localhost:4848]. Is the
server up?
No such local command, validate-multicast. To run remote commands,
start the application server (e.g. 'asadmin start-domain').
Command validate-multicast failed.
---end output---