Package org.apache.geronimo.mavenplugins.geronimo

Examples of org.apache.geronimo.mavenplugins.geronimo.ServerProxy


     * @optional
     */
    protected String[] arg = null;

    protected void doExecute() throws Exception {
        ServerProxy server =
            new ServerProxy(hostname, port, username, password);

        String geronimoHomeStr = server.getGeronimoHome();
       
        log.info("Geronimo Home: " + geronimoHomeStr);

        if (geronimoHomeStr == null) {
            throw new MojoExecutionException("Unable to determine Geronimo installation directory");
View Full Code Here


            }
            timer.schedule(timeoutTask, verifyTimeout * 1000);
        }

        // Verify server started
        ServerProxy server = new ServerProxy(hostname, port, username, password);
        boolean started = false;
        while (!started) {
            if (verifyTimedOut.isSet()) {
                throw new MojoExecutionException("Unable to verify if the server was started in the given time (" + verifyTimeout + " seconds)");
            }

            if (errorHolder.isSet()) {
                throw new MojoExecutionException("Failed to start Geronimo server", (Throwable)errorHolder.get());
            }

            started = server.isFullyStarted();

            if (!started) {
                Throwable error = server.getLastError();
                if ((error != null) && (log.isDebugEnabled())) {
                    log.debug("Server query failed; ignoring", error);
                }

                Thread.sleep(1000);
            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);
View Full Code Here

     * @optional
     */
    protected String[] arg = null;

    protected void doExecute() throws Exception {
        ServerProxy server =
            new ServerProxy(hostname, port, username, password);

        String geronimoHomeStr = server.getGeronimoHome();

        server.closeConnection();
       
        log.info("Geronimo Home: " + geronimoHomeStr);

        if (geronimoHomeStr == null) {
            throw new MojoExecutionException("Unable to determine Geronimo installation directory");
View Full Code Here

            }
            timer.schedule(timeoutTask, verifyTimeout * 1000);
        }

        // Verify server started
        ServerProxy server = new ServerProxy(hostname, port, username, password);
        boolean started = false;
        while (!started) {
            if (verifyTimedOut.isSet()) {
                throw new MojoExecutionException("Unable to verify if the server was started in the given time (" + verifyTimeout + " seconds)");
            }

            if (errorHolder.isSet()) {
                throw new MojoExecutionException("Failed to start Geronimo server", (Throwable)errorHolder.get());
            }

            started = server.isFullyStarted();

            if (!started) {
                Throwable error = server.getLastError();
                if ((error != null) && (log.isDebugEnabled())) {
                    log.debug("Server query failed; ignoring", error);
                }

                Thread.sleep(1000);
            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);
View Full Code Here

            log.debug("Starting verify timeout task; triggers in: " + timeout + "s");
            timer.schedule(timeoutTask, timeout * 1000);
        }

        // Verify server started
        ServerProxy server = new ServerProxy(hostname, port, username, password);
        boolean started = false;
        while (!started) {
            if (verifyTimedOut.isSet()) {
                throw new MojoExecutionException("Unable to verify if the server was started in the given time");
            }

            started = server.isFullyStarted();

            if (!started) {
                Throwable error = server.getLastError();
                if (error != null) {
                    log.debug("Server query failed; ignoring", error);
                }

                Thread.sleep(1000);
            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started");
View Full Code Here

     * @optional
     */
    protected String[] arg = null;

    protected void doExecute() throws Exception {
        ServerProxy server =
            new ServerProxy(hostname, port, username, password);

        String geronimoHomeStr = server.getGeronimoHome();

        server.closeConnection();
       
        log.info("Geronimo Home: " + geronimoHomeStr);

        if (geronimoHomeStr == null) {
            throw new MojoExecutionException("Unable to determine Geronimo installation directory");
View Full Code Here

     * @parameter expression="${failIfNotStarted}" default-value="true"
     */
    private boolean failIfNotStarted = true;
   
    protected void doExecute() throws Exception {
        ServerProxy server = new ServerProxy(hostname, port, username, password);

        //
        // TODO: Maybe we just need isStarted() not need to be fully started?
        //
       
        if (!server.isFullyStarted()) {
            String msg = "Server does not appear to be started";
           
            if (failIfNotStarted) {
                throw new MojoExecutionException(msg);
            }
            else {
                log.warn(msg);
            }
        }
        else {
            log.info("Stopping Geronimo server...");
           
            server.shutdown();
            server.closeConnection();

            //
            // TODO: Verify its down?
            //
        }
View Full Code Here

     * @optional
     */
    protected String[] arg = null;

    protected void doExecute() throws Exception {
        ServerProxy server =
            new ServerProxy(hostname, port, username, password);

        String geronimoHomeStr = server.getGeronimoHome();

        server.closeConnection();
       
        log.info("Geronimo Home: " + geronimoHomeStr);

        if (geronimoHomeStr == null) {
            throw new MojoExecutionException("Unable to determine Geronimo installation directory");
View Full Code Here

     * @parameter expression="${failIfNotStarted}" default-value="true"
     */
    private boolean failIfNotStarted = true;
   
    protected void doExecute() throws Exception {
        ServerProxy server = new ServerProxy(hostname, port, username, password);

        //
        // TODO: Maybe we just need isStarted() not need to be fully started?
        //
       
        if (!server.isFullyStarted()) {
            String msg = "Server does not appear to be started";
           
            if (failIfNotStarted) {
                throw new MojoExecutionException(msg);
            }
            else {
                log.warn(msg);
            }
        }
        else {
            log.info("Stopping Geronimo server...");
           
            server.shutdown();
            server.closeConnection();

            //
            // TODO: Verify its down?
            //
        }
View Full Code Here

            }
            timer.schedule(timeoutTask, verifyTimeout * 1000);
        }

        // Verify server started
        ServerProxy server = new ServerProxy(hostname, port, username, password);
        boolean started = false;
        while (!started) {
            if (verifyTimedOut.isSet()) {
                throw new MojoExecutionException("Unable to verify if the server was started in the given time (" + verifyTimeout + " seconds)");
            }

            if (errorHolder.isSet()) {
                throw new MojoExecutionException("Failed to start Geronimo server", (Throwable)errorHolder.get());
            }

            started = server.isFullyStarted();

            if (!started) {
                Throwable error = server.getLastError();
                if ((error != null) && (log.isDebugEnabled())) {
                    log.debug("Server query failed; ignoring", error);
                }

                Thread.sleep(1000);
            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.mavenplugins.geronimo.ServerProxy

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.