Examples of WebModule


Examples of org.apache.geronimo.j2ee.deployment.WebModule

        }

        // Create the AnnotatedApp interface for the WebModule
        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);

        WebModule module = new WebModule(standAlone, moduleName, environment, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, JETTY_NAMESPACE, annotatedWebApp);

        for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
            mbe.createModule(module, plan, moduleFile, targetPath, specDDUrl, environment, contextRoot, earName, naming, idBuilder);
        }
        return module;
View Full Code Here

Examples of org.apache.geronimo.j2ee.deployment.WebModule

    }

    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection repository) throws DeploymentException {
        EARContext moduleContext = module.getEarContext();
        AbstractName moduleName = moduleContext.getModuleName();
        WebModule webModule = (WebModule) module;

        WebAppType webApp = (WebAppType) webModule.getSpecDD();
        JettyWebAppType jettyWebApp = (JettyWebAppType) webModule.getVendorDD();
        GBeanData webModuleData = new GBeanData(moduleName, WebAppContextWrapper.class);

        configureBasicWebModuleAttributes(webApp, jettyWebApp, moduleContext, earContext, webModule, webModuleData);

        // unsharableResources, applicationManagedSecurityResources
        GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
        //N.B. use earContext not moduleContext
        //TODO fix this for javaee 5 !!!
        resourceEnvironmentSetter.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(), jettyWebApp.getResourceRefArray());
        try {
            moduleContext.addGBean(webModuleData);

            // configure hosts and virtual-hosts
            configureHosts(earContext, jettyWebApp, webModuleData);


            String contextPath = webModule.getContextRoot();
            if (contextPath == null) {
                throw new DeploymentException("null contextPath");
            }
            if (!contextPath.startsWith("/")) {
                contextPath = "/" + contextPath;
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

            List list = model.getWebApps();
            for (int i = 0; i < webApps.length; i++) {
                ConfigurationData app = webApps[i];
                WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
                if (app.isRunning()) {
                    WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
                    data.setContextRoot(web.getContextPath());
                    String path;
                    if(web.getWARDirectory().getProtocol().equals("file")) {
                        path = web.getWARDirectory().getPath();
                    } else {
                        path = "WARMustBeUnpacked";
                    }

                    data.setWebAppDir(path);
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        addDependencies(details, configObjName);
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        for (Configuration child : config.getChildren()) {
                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                childDetails.setComponentName(child.getId().toString());
                                WebModule webModule = getWebModule(config, child);
                                if (webModule != null) {
                                    childDetails.getContextPaths().add(webModule.getContextPath());
                                }
                                addDependencies(childDetails, configObjName);
                                moduleDetails.add(childDetails);
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        Iterator childs = config.getChildren().iterator();
                        while (childs.hasNext()) {
                            Configuration child = (Configuration) childs.next();
                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                WebModule webModule = getWebModule(config, child);
                                if (webModule != null) {
                                    details.getContextPaths().add(webModule.getContextPath());
                                }
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

            ConfigurationInfo info = (ConfigurationInfo) j.next();
            if (shouldListConfig(info)) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());

                if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
                    WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                    if (webModule != null) {
                        details.setContextPath(webModule.getContextPath());
                        details.setUrlFor(webModule.getURLFor());
                    }
                }
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean flag = false;
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                            if (showDependencies) {
                                addDependencies(details, configObjName);
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

            List list = model.getWebApps();
            for (int i = 0; i < webApps.length; i++) {
                ConfigurationData app = webApps[i];
                WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
                if (app.isRunning()) {
                    WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
                    data.setContextRoot(web.getContextPath());
                    String path;
                    if(web.getWARDirectory().getProtocol().equals("file")) {
                        path = web.getWARDirectory().getPath();
                    } else {
                        path = "WARMustBeUnpacked";
                    }

                    data.setWebAppDir(path);
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

            ConfigurationInfo info = (ConfigurationInfo) j.next();
            if (shouldListConfig(info)) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());

                if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
                    WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                    if (webModule != null) {
                        details.setContextPath(webModule.getContextPath());
                        details.setUrlFor(webModule.getURLFor());
                    }
                }
                moduleDetails.add(details);
            }
        }
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), getConfigurationState(info));
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                        }
                    } else if (info.getType().equals(ConfigurationModuleType.CAR)) {
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.WebModule

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), getConfigurationState(info));
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                        }
                    } else if (info.getType().equals(ConfigurationModuleType.CAR)) {
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.