Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationManager.loadConfiguration()


            for (String artifactName : deploymentConfigs) {
                org.apache.geronimo.kernel.repository.Artifact configName = org.apache.geronimo.kernel.repository.Artifact.create(artifactName);
                if (!configurationManager.isLoaded(configName)) {
                    RecordingLifecycleMonitor monitor = new RecordingLifecycleMonitor();
                    try {
                        configurationManager.loadConfiguration(configName, monitor);
                    } catch (LifecycleException e) {
                        log.error("Could not load deployer configuration: " + configName + "\n" + monitor.toString(), e);
                    }
                    monitor = new RecordingLifecycleMonitor();
                    try {
View Full Code Here


                    do {
                        unloadedConfigsCount = unloadedConfigs.size();
                        LinkedHashSet<Artifact> sorted = configurationManager.sort(unloadedConfigs, lifecycleMonitor);
                        for (Artifact configID : sorted) {
                            monitor.moduleLoading(configID);
                            configurationManager.loadConfiguration(configID, lifecycleMonitor);
                            int configModuleType = configurationManager.getConfiguration(configID).getModuleType().getValue();
                            unloadedConfigs.remove(configID);
                            monitor.moduleLoaded(configID);
                            try {
                                monitor.moduleStarting(configID);
View Full Code Here

            Bundle bundle = bundleContext.getBundle();
            in = bundle.getEntry("META-INF/config.ser").openStream();
            //TODO there are additional consistency checks in RepositoryConfigurationStore that we should use.
            ConfigurationData data = ConfigurationUtil.readConfigurationData(in);
            data.setBundleContext(bundleContext);
            manager.loadConfiguration(data);
            id = data.getId();
            //            manager.startConfiguration(id);
        } finally {
            if (in != null)
                try {
View Full Code Here

            for (String artifactName : deploymentConfigs) {
                org.apache.geronimo.kernel.repository.Artifact configName = org.apache.geronimo.kernel.repository.Artifact.create(artifactName);
                if (!configurationManager.isLoaded(configName)) {
                    RecordingLifecycleMonitor monitor = new RecordingLifecycleMonitor();
                    try {
                        configurationManager.loadConfiguration(configName, monitor);
                    } catch (LifecycleException e) {
                        getLog().error("Could not load deployer configuration: " + configName + "\n" + monitor.toString(), e);
                    }
                    monitor = new RecordingLifecycleMonitor();
                    try {
View Full Code Here

            }

            configurationData.setUseEnvironment(true);
            configurationData.setBundleContext(bundle.getBundleContext());

            configurationManager.loadConfiguration(configurationData);
            configurationManager.startConfiguration(configurationData.getId());

            deployedArtifact = configurationData.getId();

            LOGGER.info("Deployed WAB {} at {}", new Object[] {bundle, contextPath});
View Full Code Here

            Artifact configId = Artifact.create(config);

            if (START_ACTION.equals(action)) {

                if (!configurationManager.isLoaded(configId)) {
                    configurationManager.loadConfiguration(configId);
                }
                if (!configurationManager.isRunning(configId)) {
                    org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager
                    .startConfiguration(configId);
                    addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.infoMsg01")
View Full Code Here

        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        Collection<Artifact> resolvedModules = configurationManager.getArtifactResolver().resolveInClassLoader(configurations);
        LifecycleMonitor lifecycleMonitor = new DebugLoggingLifecycleMonitor(log);
        try {
            for (Artifact moduleId : resolvedModules) {
                configurationManager.loadConfiguration(moduleId, lifecycleMonitor);
                configurationManager.startConfiguration(moduleId, lifecycleMonitor);
            }
        } finally {
            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
        }
View Full Code Here

                    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());
                            flag = true;
                        } catch (NoSuchConfigException e) {
                            // Should not occur
                            e.printStackTrace();
                        } catch (LifecycleException e) {
View Full Code Here

            String config = getConfigID(actionRequest);
            Artifact configId = Artifact.create(config);

            if (START_ACTION.equals(action)) {
                if(!configurationManager.isLoaded(configId)) {
                    configurationManager.loadConfiguration(configId);
                }
                if(!configurationManager.isRunning(configId)) {
                    org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager.startConfiguration(configId);
                    messageStatus = "Started application<br /><br />";
                    this.printResults(lcresult.getStarted(), action);
View Full Code Here

        for (int i = 0; i < results.getInstalledConfigIDs().length; i++) {
            Artifact artifact = results.getInstalledConfigIDs()[i];
            if(mgr.isConfiguration(artifact)) {
                try {
                    if(!mgr.isLoaded(artifact)) {
                        mgr.loadConfiguration(artifact);
                    }
                    if(!mgr.isRunning(artifact)) {
                        mgr.startConfiguration(artifact);
                    }
                } catch (NoSuchConfigException 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.