Package com.sun.enterprise.util

Examples of com.sun.enterprise.util.ProcessExecutor.execute()


            // exec process directly to exercise needed control
            ProcessExecutor exec = new ProcessExecutor(command, securityInfo);
            // set verbose flag so process error stream get redirected to stderr
            exec.setVerbose(verbose);
            // call execute so it will not be timed out
            exec.execute(false, false);
            process=exec.getSubProcess();
            // this will force process to wait for executing process
            int exitValue=process.waitFor();
            System.exit(exitValue);
        } catch (Exception e) {
View Full Code Here


    {
        try
        {
            ProcessExecutor exec = new ProcessExecutor(
                                   new String[] {script.getAbsolutePath()});
            exec.execute();
        }
        catch (Exception e)
        {
            throw new InstanceException(_strMgr.getString("procExecError"), e);
        }
View Full Code Here

            ProcessExecutor exec = new ProcessExecutor(command, interativeOptions);
            if (nativeLauncher) {
                // native processes don't return, so don't wait
                // this follows the methodology for se, but should be revisted to make
                // sure timeouts for state transitions are reasonable
                exec.execute(false, false);
            } else {
                // expect the process to return
                exec.execute();
            }
View Full Code Here

                // this follows the methodology for se, but should be revisted to make
                // sure timeouts for state transitions are reasonable
                exec.execute(false, false);
            } else {
                // expect the process to return
                exec.execute();
            }


            // this signature for execute will terminiate the process
            // if it goes on too long, reason for return signature is for SE ProcessManager watchdog
View Full Code Here

   

    public void startInstance() throws ProcessManagerException {
        try {
            ProcessExecutor pe=new ProcessExecutor(getStartCommandAsArray());
            pe.execute(false, false);
            setProcess(pe.getSubProcess());
        } catch (Exception e) {
            throw new ProcessManagerException(e);
        }
    }
View Full Code Here

  
    public void stopInstance() throws ProcessManagerException {
        try {
            ProcessExecutor pe=new ProcessExecutor(getStopCommandAsArray());
            pe.execute(false, false);
        } catch (Exception e) {
            throw new ProcessManagerException(e);
        }
    }
View Full Code Here

        int retval = 0;
        String[] cmd = getReconfigCommand(instanceName);
        if (cmd != null) {
            ProcessExecutor pe = new ProcessExecutor(cmd);
            try {
                pe.execute();
            } catch (ExecException ee) {
                AdminChannel.debug(ee);
                retval = 1;
            }
        }
View Full Code Here

        try
        {
            ProcessExecutor exec=new ProcessExecutor(command, interativeOptions);
            // call execute so no output lines are returned and
            // process does not have a time limit to start
            exec.execute(false, false);
            return exec;
        }
        catch (Exception e)
        {
            throw new InstanceException(_strMgr.getString("procExecError"), e);
View Full Code Here

  {
    try
    {
      String[] commands = commandsList.toArray(new String[commandsList.size()]);
      ProcessExecutor pe  = new ProcessExecutor(commands);
      String[]    out = pe.execute(true)
      Arrays.toString(out);
      int retVal = pe.getProcessExitValue();

      Object[] ret = new Object[3];
      ret[0] = "Output Strings:";
View Full Code Here

            at = System.getProperty("AUTH_TOKEN");
        try {
            final String[] cmd = new String[]{path2Auths, user};
            ProcessExecutor pe = new ProcessExecutor(cmd);
            pe.setExecutionRetentionFlag(true);
            pe.execute();
            auths.append(pe.getLastExecutionOutput());
            final StringTokenizer st = new StringTokenizer(pe.getLastExecutionOutput(), at);
            while (st.hasMoreTokens()) {
                String t = st.nextToken();
                if (t != null)
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.