Examples of WebApplication


Examples of org.wso2.carbon.server.WebApplication

        WebApplicationsHolder holder = (WebApplicationsHolder) getConfigContext().
                        getProperty(CarbonConstants.WEB_APPLICATIONS_HOLDER);

        // first search in the started webapps
        String state = STARTED;
        WebApplication webApplication = holder.getStartedWebapps().get(fileName);

        // if it is null, try searching stopped webapps
        if (webApplication == null) {
            state = STOPPED;
            webApplication = holder.getStoppedWebapps().get(fileName);
        }

        // if it is still null, try searching faulty webapps
        if (webApplication == null) {
            state = FAULTY;
            webApplication = holder.getFaultyWebapps().get(fileName);
        }

        // if we could find a web app for the given file name, create the Metadata instance
        if (webApplication != null) {
            warCappMetadata = new WarCappMetadata();
            warCappMetadata.setContext(webApplication.getContextName());
            warCappMetadata.setState(state);
            warCappMetadata.setWebappFileName(webApplication.getWebappFile().getName());

            try {
                warCappMetadata.setHostName(NetworkUtils.getLocalHostname());
            } catch (SocketException e) {
                log.error("Error occurred while getting local hostname", e);
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.