Package org.rhq.plugins.apache.util

Examples of org.rhq.plugins.apache.util.HttpdConfParser


        if (!confPath.startsWith("/")) { // TODO implement for Windows too
            String basePath = context.getParentResourceComponent().getServerRoot().getAbsolutePath();
            confPath = basePath + "/" + confPath;
        }

        HttpdConfParser parser = new HttpdConfParser();
        if (parser.parse(confPath) && parser.isModJkInstalled()) {

            Configuration config = context.getDefaultPluginConfiguration();
            if (parser.getWorkerPropertiesFile() != null) {
                PropertySimple workers = new PropertySimple("workerFile", parser.getWorkerPropertiesFile());
                config.put(workers);
            }
            if (parser.getUriWorkerLocation() != null) {
                PropertySimple workers = new PropertySimple("uriWorkerFile", parser.getUriWorkerLocation());
                config.put(workers);
            }

            DiscoveredResourceDetails detail =
                new DiscoveredResourceDetails(context.getResourceType(), confPath, "mod_jk", modJkVersion, "Mod_JK",
View Full Code Here


        // If we can't update the file, then there is nothing left to do.
        if (!httpdConf.canWrite()) {
            throw new Exception("Httpd.conf is not writable at " + confPath);
        }

        HttpdConfParser cparser = new HttpdConfParser();
        cparser.parse(confPath);
        // TODO back up original file
        try {
            BufferedWriter writer = null;
            try {
                writer = new BufferedWriter(new FileWriter(httpdConf, true));
                if (cparser.isModJkInstalled()) {
                    builder.append("Mod_jk is already installed\n");
                    if (cparser.getWorkerPropertiesFile() != null) {
                        builder.append("Found a worker.properties file at ").append(cparser.getWorkerPropertiesFile());
                        builder.append("\n");
                    } else
                        needWorkersProps = true;

                    if (cparser.getUriWorkerLocation() != null) {
                        builder.append("Found a urimap file at ").append(cparser.getUriWorkerLocation());
                    } else
                        needUriWorkers = true;
                } else {
                    builder.append("No mod_jk installed yet at ").append(confPath).append("\n");
View Full Code Here

TOP

Related Classes of org.rhq.plugins.apache.util.HttpdConfParser

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.