Package org.apache.geronimo.kernel.config

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


        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

        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

        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

                File ser = new File(meta, "config.ser");
                if(!ser.isFile() || !ser.canRead() || ser.length() == 0) {
                    continue;
                }
                try {
                    ConfigurationInfo configurationInfo = loadConfigurationInfo(configId);
                    configs.add(configurationInfo);
                } catch (NoSuchConfigException e) {
                    log.error("Unexpected error: found META-INF/config.ser for "+configId+" but couldn't load ConfigurationInfo", e);
                } catch (IOException e) {
                    log.error("Unable to load ConfigurationInfo for "+configId, e);
View Full Code Here

            throw new NoSuchConfigException(configId);
        }

        File inPlaceLocation = inPlaceConfUtil.readInPlaceLocation(location);

        ConfigurationInfo configurationInfo;
        if (location.isDirectory()) {
            File infoFile = new File(location, "META-INF");
            infoFile = new File(infoFile, "config.info");

            InputStream in = new FileInputStream(infoFile);
View Full Code Here

            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

        List stores = mgr.listStores();
        for (int i = 0; i < stores.size(); i++) {
            AbstractName name = (AbstractName) stores.get(i);
            List configs = mgr.listConfigurations(name);
            for (int j = 0; j < configs.size(); j++) {
                ConfigurationInfo info = (ConfigurationInfo) configs.get(j);
                PluginMetadata data = installer.getPluginMetadata(info.getConfigID());
                Element config = doc.createElement("plugin");
                root.appendChild(config);
                createText(doc, config, "name", data.getName());
                createText(doc, config, "module-id", data.getModuleId().toString());
                createText(doc, config, "category", "Geronimo Deployments");
View Full Code Here

        List moduleDetails = new ArrayList();
        ConfigurationManager configManager = ConfigurationUtil.getConfigurationManager(kernel);
        DependencyManager depMgr = kernel.getDependencyManager();
        List infos = configManager.listConfigurations();
        for (Iterator j = infos.iterator(); j.hasNext();) {
            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());
                    }
                }
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean flag = false;
                    // Check if the configuration is loaded.  If not, load it to get information.
                    if(!kernel.isLoaded(configObjName)) {
                        try {
                            configManager.loadConfiguration(configObjName.getArtifact());
View Full Code Here

        ConfigurationManager configManager = ConfigurationUtil
                .getConfigurationManager(kernel);

        List infos = configManager.listConfigurations();
        for (Iterator infoIterator = infos.iterator(); infoIterator.hasNext();) {
            ConfigurationInfo info = (ConfigurationInfo) infoIterator.next();
            Configuration conf = configManager.getConfiguration(info
                    .getConfigID());
            if (conf != null) {
                StringTree curr = new StringTree(info.getConfigID().toString());
                ;
                switch (info.getType().getValue()) {
                case 0:// EAR
                {
                    treeEAR.addChild(curr);
                    break;
                }
                case 1:// EJB
                {
                    treeEJB.addChild(curr);
                    break;
                }
                case 2:// CAR
                {
                    treeCLI.addChild(curr);
                    break;
                }

                case 3:// RAR
                {
                    treeRAR.addChild(curr);
                    break;
                }
                case 4:// WAR
                {
                    treeWeb.addChild(curr);
                    break;
                }
                case 5:// SERVICE
                {
                    treeSys.addChild(curr);
                    break;
                }
                }

                addDependencies(curr, conf);

                if (info.getType().getValue() == ConfigurationModuleType.EAR
                        .getValue()) {
                    StringTree nodeEJB = new StringTree("EJBModule");
                    curr.addChild(nodeEJB);

                    StringTree nodeWeb = new StringTree("WebModule");
                    curr.addChild(nodeWeb);

                    StringTree nodeRAR = new StringTree("ResourceAdapterModule");
                    curr.addChild(nodeRAR);

                    StringTree nodeCLI = new StringTree("AppClientModule");
                    curr.addChild(nodeCLI);

                    Map query = new HashMap();
                    query.put("j2eeType", "EJBModule");
                    query.put("J2EEApplication", info.getConfigID().toString());
                    Set setEnt = kernel
                            .listGBeans(new org.apache.geronimo.gbean.AbstractNameQuery(
                                    null, query));
                    Iterator iterator = setEnt.iterator();
                    while (iterator.hasNext()) {
                        AbstractName gb = (AbstractName) iterator.next();
                        StringTree subCurr = new StringTree(info.getConfigID()
                                .getGroupId()
                                + "/"
                                + info.getConfigID().getArtifactId()
                                + "_"
                                + gb.getNameProperty("name")
                                + "/"
                                + info.getConfigID().getVersion()
                                + "/"
                                + info.getConfigID().getType());
                        nodeEJB.addChild(subCurr);
                        addDependencies(subCurr, configManager
                                .getConfiguration(gb.getArtifact()));
                    }

                    Map query1 = new HashMap();
                    query1.put("j2eeType", "ResourceAdapterModule");
                    query1
                            .put("J2EEApplication", info.getConfigID()
                                    .toString());
                    Set setEnt1 = kernel
                            .listGBeans(new org.apache.geronimo.gbean.AbstractNameQuery(
                                    null, query1));

                    Iterator iterator1 = setEnt1.iterator();
                    while (iterator1.hasNext()) {
                        AbstractName gb = (AbstractName) iterator1.next();
                        StringTree subCurr = new StringTree(info.getConfigID()
                                .getGroupId()
                                + "/"
                                + info.getConfigID().getArtifactId()
                                + "_"
                                + gb.getNameProperty("name")
                                + "/"
                                + info.getConfigID().getVersion()
                                + "/"
                                + info.getConfigID().getType());
                        nodeRAR.addChild(subCurr);
                        addDependencies(subCurr, configManager
                                .getConfiguration(gb.getArtifact()));
                    }
View Full Code Here

TOP

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

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.