Examples of ConfigurationInfo


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

        if (dir.list().length == 0) {
            return null;
        }

        // get the existing inplace configuration if there is one
        ConfigurationInfo existingConfiguration = null;
        List list = configurationManager.listConfigurations();
        for (Iterator iterator = list.iterator(); iterator.hasNext();) {
            ConfigurationInfo configurationInfo = (ConfigurationInfo) iterator.next();
            if (dir.equals(configurationInfo.getInPlaceLocation())) {
                existingConfiguration = configurationInfo;
            }
        }
        Artifact existingConfigurationId = (existingConfiguration == null) ? null : existingConfiguration.getConfigID();
View Full Code Here

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

        for (Iterator i = stores.iterator(); i.hasNext();) {
            AbstractName storeName = (AbstractName) i.next();
            try {
                List infos = mgr.listConfigurations(storeName);
                for (Iterator j = infos.iterator(); j.hasNext();) {
                    ConfigurationInfo info = (ConfigurationInfo) j.next();
                    AbstractName configuration = Configuration.getConfigurationAbstractName(info.getConfigID());
                    if (type == null || type.getValue() == info.getType().getValue()) {
                        J2EEDeployedObject module = getModuleForConfiguration(info.getConfigID());
                        results.add(new ConfigurationData(info.getConfigID(), configuration, null, info.getState(), info.getType(), module == null ? null : kernel.getAbstractNameFor(module)));
                    }
                    if (includeChildModules && info.getType().getValue() == ConfigurationModuleType.EAR.getValue() && info.getState().toInt() == State.RUNNING_INDEX)
                    {
                        J2EEApplication app = (J2EEApplication) getModuleForConfiguration(info.getConfigID());
                        if (app == null) {
                            throw new IllegalStateException("Unable to load children for J2EE Application '" + info.getConfigID() + "' (no J2EEApplication found)");
                        }
                        Object[] modules = null;
                        if (type == null) {
                            modules = app.getModulesInstances();
                        } else if (type.equals(ConfigurationModuleType.CAR)) {
                            modules = app.getClientModules();
                        } else if (type.equals(ConfigurationModuleType.EJB)) {
                            modules = app.getEJBModules();
                        } else if (type.equals(ConfigurationModuleType.RAR)) {
                            modules = app.getRAModules();
                        } else if (type.equals(ConfigurationModuleType.WAR)) {
                            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;
                                } else if (module instanceof ResourceAdapterModule) {
                                    moduleType = ConfigurationModuleType.RAR;
                                } else if (module instanceof AppClientModule) moduleType = ConfigurationModuleType.CAR;
                            }
                            String moduleName;
                            if (type != null && type.equals(ConfigurationModuleType.WAR)) {
                                moduleName = ((WebModule) module).getWARName();
                            } else {
                                //todo: solutions for other module types
                                moduleName = (String) kernel.getAbstractNameFor(module).getName().get(NameFactory.J2EE_NAME);
                            }
                            results.add(new ConfigurationData(info.getConfigID(), configuration, moduleName, info.getState(), moduleType, kernel.getAbstractNameFor(module)));
                        }
                    }
                }
            } catch (NoSuchStoreException e) {
                // we just got this list so this should not happen
View Full Code Here

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

        isConfigurationInstalled = false;

        touch(watchFile1, NOW);
        touch(watchFile2, NOW);

        existingConfigurationInfos.add(new ConfigurationInfo(null, NEW_ID, ConfigurationModuleType.CAR, PAST, null, null, dir));

        SingleFileHotDeployer singleFileHotDeployer = new SingleFileHotDeployer(dir,
                watchPaths,
                Collections.singleton(builder),
                store,
View Full Code Here

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

        isConfigurationInstalled = false;

        touch(watchFile1, NOW);
        touch(watchFile2, NOW);

        existingConfigurationInfos.add(new ConfigurationInfo(null, DIFFERENT_ID, ConfigurationModuleType.CAR, PAST, null, null, dir));

        SingleFileHotDeployer singleFileHotDeployer = new SingleFileHotDeployer(dir,
                watchPaths,
                Collections.singleton(builder),
                store,
View Full Code Here

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

        isConfigurationInstalled = false;

        touch(watchFile1, NOW);
        touch(watchFile2, NOW);

        existingConfigurationInfos.add(new ConfigurationInfo(null, OLD_VERSION_ID, ConfigurationModuleType.CAR, PAST, null, null, dir));

        SingleFileHotDeployer singleFileHotDeployer = new SingleFileHotDeployer(dir,
                watchPaths,
                Collections.singleton(builder),
                store,
View Full Code Here

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

        isConfigurationInstalled = false;

        touch(watchFile1, PAST);
        touch(watchFile2, PAST);

        existingConfigurationInfos.add(new ConfigurationInfo(null, NEW_ID, ConfigurationModuleType.CAR, NOW, null, null, dir));

        SingleFileHotDeployer singleFileHotDeployer = new SingleFileHotDeployer(dir,
                watchPaths,
                Collections.singleton(builder),
                store,
View Full Code Here

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

        isConfigurationInstalled = false;

        touch(watchFile1, PAST);
        touch(watchFile2, PAST);

        existingConfigurationInfos.add(new ConfigurationInfo(null, OLD_VERSION_ID, ConfigurationModuleType.CAR, NOW, null, null, dir));

        SingleFileHotDeployer singleFileHotDeployer = new SingleFileHotDeployer(dir,
                watchPaths,
                Collections.singleton(builder),
                store,
View Full Code Here

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

            for (Target aTargetList : targetList) {
                TargetImpl target = (TargetImpl) aTargetList;
                AbstractName storeName = target.getAbstractName();
                List infos = configurationManager.listConfigurations(storeName);
                for (Object info1 : infos) {
                    ConfigurationInfo info = (ConfigurationInfo) info1;
                    if (filter.accept(info)) {
                        String name = info.getConfigID().toString();
                        List list = CommandSupport.loadChildren(kernel, name);
                        TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target, name, (String[]) list.toArray(new String[list.size()]));
                        moduleID.setType(CommandSupport.convertModuleType(info.getType()));
                        if (moduleID.getChildTargetModuleID() != null) {
                            for (int k = 0; k < moduleID.getChildTargetModuleID().length; k++) {
                                TargetModuleIDImpl child = (TargetModuleIDImpl) moduleID.getChildTargetModuleID()[k];
                                if (CommandSupport.isWebApp(kernel, child.getModuleID())) {
                                    child.setType(ModuleType.WAR);
View Full Code Here

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

            for (Target aTargetList : targetList) {
                TargetImpl target = (TargetImpl) aTargetList;
                AbstractName storeName = target.getAbstractName();
                List infos = configurationManager.listConfigurations(storeName);
                for (Object info1 : infos) {
                    ConfigurationInfo info = (ConfigurationInfo) info1;
                    if (filter.accept(info)) {
                        String name = info.getConfigID().toString();
                        List list = CommandSupport.loadChildren(kernel, name);
                        TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target, name, (String[]) list.toArray(new String[list.size()]));
                        moduleID.setType(CommandSupport.convertModuleType(info.getType()));
                        if (moduleID.getChildTargetModuleID() != null) {
                            for (int k = 0; k < moduleID.getChildTargetModuleID().length; k++) {
                                TargetModuleIDImpl child = (TargetModuleIDImpl) moduleID.getChildTargetModuleID()[k];
                                if (CommandSupport.isWebApp(kernel, child.getModuleID())) {
                                    child.setType(ModuleType.WAR);
View Full Code Here

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

            for (Target aTargetList : targetList) {
                TargetImpl target = (TargetImpl) aTargetList;
                AbstractName storeName = target.getAbstractName();
                List infos = configurationManager.listConfigurations(storeName);
                for (Object info1 : infos) {
                    ConfigurationInfo info = (ConfigurationInfo) info1;
                    if (filter.accept(info)) {
                        String name = info.getConfigID().toString();
                        List list = CommandSupport.loadChildren(kernel, name);
                        TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target, name, (String[]) list.toArray(new String[list.size()]));
                        moduleID.setType(CommandSupport.convertModuleType(info.getType()));
                        if (moduleID.getChildTargetModuleID() != null) {
                            for (int k = 0; k < moduleID.getChildTargetModuleID().length; k++) {
                                TargetModuleIDImpl child = (TargetModuleIDImpl) moduleID.getChildTargetModuleID()[k];
                                if (CommandSupport.isWebApp(kernel, child.getModuleID())) {
                                    child.setType(ModuleType.WAR);
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.