Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationModuleType


                        } else if (type.equals(ConfigurationModuleType.WAR)) {
                            modules = app.getWebModules();
                        } //todo: handle dynamically registered module types, etc.
                        if (modules == null) continue;
                        for (Object module : modules) {
                            ConfigurationModuleType moduleType = type;
                            if (moduleType == null) {
                                if (module instanceof WebModule) {
                                    moduleType = ConfigurationModuleType.WAR;
                                } else if (module instanceof EJBModule) {
                                    moduleType = ConfigurationModuleType.EJB;
View Full Code Here


        ConfigurationManager manager = ConfigurationUtil.getConfigurationManager(kernel);
        Configuration config = manager.getConfiguration(configuration);
        if (config == null || !manager.isRunning(configuration)) {
            return null; // The configuration is not running, so we can't get its contents
        }
        ConfigurationModuleType type = config.getModuleType();
        AbstractName result;
        try {
            if (type.equals(ConfigurationModuleType.CAR)) {
                result = config.findGBean(new AbstractNameQuery(AppClientModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.EAR)) {
                result = config.findGBean(new AbstractNameQuery(J2EEApplication.class.getName()));
            } else if (type.equals(ConfigurationModuleType.EJB)) {
                result = config.findGBean(new AbstractNameQuery(EJBModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.RAR)) {
                result = config.findGBean(new AbstractNameQuery(ResourceAdapterModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.WAR)) {
                result = config.findGBean(new AbstractNameQuery(WebModule.class.getName()));
            } else {
                return null;
            }
            ClassLoader classLoader = kernel.getClassLoaderFor(result);
View Full Code Here

        }
        for (int i = 0; i < results.length; i++) {
            AbstractName abstractName = PortletManager.getNameFor(request, realms[i]);
            String parent;
            Configuration parentConfig = configMgr.getConfiguration(abstractName.getArtifact());
            ConfigurationModuleType parentType = parentConfig.getModuleType();
            if(ConfigurationModuleType.SERVICE.equals(parentType)) {
                parent = null; // Server-wide
            } else {
                parent = abstractName.getArtifact().toString();
            }
View Full Code Here

                        // and defined by the store, then it is stopped.
                        state = State.STOPPED;
                    }

                    GBeanData bean = loadConfig(getRoot(configId));
                    ConfigurationModuleType type = (ConfigurationModuleType) bean.getAttribute("type");

                    configs.add(new ConfigurationInfo(objectName, configId, state, type));
                } catch (Exception e) {
                    // bad configuration in store - ignored for this purpose
                    log.info("Unable get configuration info for configuration " + configId, e);
View Full Code Here

        for (int i = 0; i < results.length; i++) {
            final GeronimoManagedBean managedBean = (GeronimoManagedBean) realms[i];
            AbstractName abstractName = PortletManager.getNameFor(request, realms[i]);
            String parent;
            Configuration parentConfig = configMgr.getConfiguration(abstractName.getArtifact());
            ConfigurationModuleType parentType = parentConfig.getModuleType();
            if(ConfigurationModuleType.SERVICE.equals(parentType)) {
                parent = null; // Server-wide
            } else {
                parent = abstractName.getArtifact().toString();
            }
View Full Code Here

    public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile earFile, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException {
        assert plan != null;
        ApplicationInfo applicationInfo = (ApplicationInfo) plan;

        EARContext earContext = null;
        ConfigurationModuleType applicationType = applicationInfo.getType();
        applicationInfo.getEnvironment().setConfigId(configId);
        File configurationDir;
        try {
            configurationDir = targetConfigurationStore.createNewConfigurationDir(configId);
        } catch (ConfigurationAlreadyExistsException e) {
View Full Code Here

    public boolean canConvert(Class clazz) {
        return ConfigurationModuleType.class.equals(clazz);
    }

    protected String toString(Object object) {
        ConfigurationModuleType type = (ConfigurationModuleType) object;
        return type.getName();
    }
View Full Code Here

                            modules = app.getWebModules();
                        } //todo: handle dynamically registered module types, etc.
                        if (modules == null) continue;
                        for (int k = 0; k < modules.length; k++) {
                            Object module = modules[k];
                            ConfigurationModuleType moduleType = type;
                            if (moduleType == null) {
                                if (module instanceof WebModule) {
                                    moduleType = ConfigurationModuleType.WAR;
                                } else if (module instanceof EJBModule) {
                                    moduleType = ConfigurationModuleType.EJB;
View Full Code Here

        ConfigurationManager manager = ConfigurationUtil.getConfigurationManager(kernel);
        Configuration config = manager.getConfiguration(configuration);
        if (config == null || !manager.isRunning(configuration)) {
            return null; // The configuration is not running, so we can't get its contents
        }
        ConfigurationModuleType type = config.getModuleType();
        AbstractName result;
        try {
            if (type.equals(ConfigurationModuleType.CAR)) {
                result = config.findGBean(new AbstractNameQuery(AppClientModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.EAR)) {
                result = config.findGBean(new AbstractNameQuery(J2EEApplication.class.getName()));
            } else if (type.equals(ConfigurationModuleType.EJB)) {
                result = config.findGBean(new AbstractNameQuery(EJBModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.RAR)) {
                result = config.findGBean(new AbstractNameQuery(ResourceAdapterModule.class.getName()));
            } else if (type.equals(ConfigurationModuleType.WAR)) {
                result = config.findGBean(new AbstractNameQuery(WebModule.class.getName()));
            } else {
                return null;
            }
            return (J2EEDeployedObject) kernel.getProxyManager().createProxy(result, getClass().getClassLoader());
View Full Code Here

                            modules = app.getWebModules();
                        } //todo: handle dynamically registered module types, etc.
                        if (modules == null) continue;
                        for (int k = 0; k < modules.length; k++) {
                            Object module = modules[k];
                            ConfigurationModuleType moduleType = type;
                            if (moduleType == null) {
                                if (module instanceof WebModule) {
                                    moduleType = ConfigurationModuleType.WAR;
                                } else if (module instanceof EJBModule) {
                                    moduleType = ConfigurationModuleType.EJB;
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.config.ConfigurationModuleType

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.