Package com.sun.enterprise.admin.cli.remote

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()


    private boolean canSuspend() {

        try {
            RemoteCommand cmd = new RemoteCommand("list-commands",
                                                  programOpts, env);
            String response = cmd.executeAndReturnOutput("list-commands");

            if (response.indexOf("suspend-domain") >= 0)
                return true;
        } catch (Exception e) {
            logger.info("Exception while probing DAS (list-commands): " +
View Full Code Here


    private boolean isSuspended() {

        try {
            RemoteCommand cmd = new RemoteCommand("suspend-domain",
                                                  programOpts, env);
            String response = cmd.executeAndReturnOutput("suspend-domain",
                                                         "--_test=true");

            if (response.indexOf("SUSPENDED=TRUE") >= 0)
                return true;
View Full Code Here

            try {
                RemoteCommand cmd =
                    new RemoteCommand("_get-restart-required",
                                        programOpts, env);
                String restartRequired =
                    cmd.executeAndReturnOutput("_get-restart-required");
                if (Boolean.parseBoolean(restartRequired.trim()))
                    return strings.get("list.domains.StatusRestartRequired", dn);
            } catch (Exception ex) {
            }
            return strings.get("list.domains.StatusRunning", dn);
View Full Code Here

        programOpts.setInteractive(false);

        try {
            // run the remote stop-domain command and throw away the output
            RemoteCommand cmd = new RemoteCommand("_stop-instance", programOpts, env);
            cmd.executeAndReturnOutput("_stop-instance", "--force", force.toString());
            waitForDeath();
        }
        catch (CommandException e) {
            // 1.  We can't access the server at all
            // 2.  We timed-out waiting for it to die
View Full Code Here

        boolean isRegistered = false;
        RemoteCommand rc = null;
        String INSTANCE_DOTTED_NAME = "servers.server." + instanceName;
        try {
            rc = new RemoteCommand("get", this.programOpts, this.env);
            rc.executeAndReturnOutput("get", INSTANCE_DOTTED_NAME);
            isRegistered = true;
        } catch (CommandException ce) {
            isRegistered = false;
        }
        return isRegistered;
View Full Code Here

    private void setRendezvousOccurred(String rendezVal) {
        String dottedName = RENDEZVOUS_DOTTED_NAME + "=" + rendezVal;
        try {
            RemoteCommand rc = new RemoteCommand("set", this.programOpts, this.env);
            rc.executeAndReturnOutput("set", dottedName);
        } catch (CommandException ex) {
            logger.warning(Strings.get("import.sync.bundle.completeRegistrationFailed", dottedName));
        }
    }
View Full Code Here

    private boolean isRegisteredToDAS() {
        boolean isRegistered = false;
        try {
            RemoteCommand rc = new RemoteCommand("get", this.programOpts, this.env);
            rc.executeAndReturnOutput("get", INSTANCE_DOTTED_NAME);
            isRegistered = true;
        } catch (CommandException ex) {
            logger.finer(instanceName +" is not yet registered to DAS.");
            isRegistered=false;
        }
View Full Code Here

    private void setRendezvousOccurred(String rendezVal) throws CommandException {
        String dottedName = RENDEZVOUS_DOTTED_NAME + "=" + rendezVal;
        RemoteCommand rc = new RemoteCommand("set", this.programOpts, this.env);
        logger.finer("Setting rendezvousOccurred to " + rendezVal + " for instance " + instanceName);
        rc.executeAndReturnOutput("set", dottedName);
    }

    /* installdir is product install dir (parent of glassfish install root) */
    private int createNodeImplicit(String name, String installdir, String nodeHost) throws CommandException {
        ArrayList<String> argsList = new ArrayList<String>();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.