Package org.apache.karaf.jpm.impl

Examples of org.apache.karaf.jpm.impl.ProcessBuilderFactoryImpl


                            + " -Dkaraf.instances=\"" + System.getProperty("karaf.instances") + "\""
                            + " -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder"
                            + " -classpath \"" + classpath.toString() + "\""
                            + " " + Execute.class.getName()
                            + " restart --java-opts \"" + javaOpts + "\" " + name;
                    org.apache.karaf.jpm.Process process = new ProcessBuilderFactoryImpl().newBuilder()
                            .directory(new File(System.getProperty("karaf.home")))
                            .command(command)
                            .start();
                } else {
                    checkPid(instance);
View Full Code Here


                if (instance.pid == 0) {
                    throw new IllegalStateException("Instance already stopped");
                }
                cleanShutdown(instance);
                if (instance.pid > 0) {
                    Process process = new ProcessBuilderFactoryImpl().newBuilder().attach(instance.pid);
                    process.destroy();
                }
                return null;
            }
        }, true);
View Full Code Here

        }, true);
    }

    private void checkPid(InstanceState instance) throws IOException {
        if (instance.pid != 0) {
            Process process = new ProcessBuilderFactoryImpl().newBuilder().attach(instance.pid);
            if (!process.isRunning()) {
                instance.pid = 0;
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.karaf.jpm.impl.ProcessBuilderFactoryImpl

Copyright © 2018 www.massapicom. 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.