Package org.apache.stratos.load.balancer.extension.api.exception

Examples of org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException


            }
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error("Reconfiguration failed");
            }
            throw new LoadBalancerExtensionException(e);
        }
    }
View Full Code Here


            }
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error("Could not configure haproxy");
            }
            throw new LoadBalancerExtensionException(e);
        }
    }
View Full Code Here

    public void start() throws LoadBalancerExtensionException {

        // Check for configuration file
        File conf = new File(confFilePath);
        if (!conf.exists()) {
            throw new LoadBalancerExtensionException("Could not find haproxy configuration file");
        }

        // Start haproxy and write pid to processIdFilePath
        try {
            String command = executableFilePath + " -f " + confFilePath + " -p " + processIdFilePath;
            CommandUtils.executeCommand(command);
            if (log.isInfoEnabled()) {
                log.info("haproxy started");
            }
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error("Could not start haproxy");
            }
            throw new LoadBalancerExtensionException(e);
        }
    }
View Full Code Here

            }
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error("Could not stop haproxy");
            }
            throw new LoadBalancerExtensionException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException

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.