Package org.apache.geronimo.kernel.config

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


            for (int i=0; i<deploymentConfigs.length; i++) {
                String artifactName = deploymentConfigs[i];
                org.apache.geronimo.kernel.repository.Artifact configName =
                        org.apache.geronimo.kernel.repository.Artifact.create(artifactName);
                if (!configurationManager.isLoaded(configName)) {
                    configurationManager.loadConfiguration(configName);
                    configurationManager.startConfiguration(configName);
                }
            }
        } finally {
            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
View Full Code Here


            try {
                ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
                try {
                    for (Artifact configID : configs) {
                        monitor.moduleLoading(configID);
                        configurationManager.loadConfiguration(configID, lifecycleMonitor);
                        monitor.moduleLoaded(configID);
                        monitor.moduleStarting(configID);
                        configurationManager.startConfiguration(configID, lifecycleMonitor);
                        monitor.moduleStarted(configID);
                    }
View Full Code Here

                        continue;
                    }

                    // Load
                    if(!configurationManager.isLoaded(moduleID)) {
                        configurationManager.loadConfiguration(moduleID);
                    }

                    // Start
                    org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager.startConfiguration(moduleID);
View Full Code Here

                    try {
                      if(!configurationManager.isOnline()) {
                        //If an offline undeploy, need to load the configuration first, so that stopConfiguration()
                        //can resolve the configuration and successfully set load=false in attribute manager, otherwise
                        //starting the server will fail attempting to start an config that does not exist.
                        configurationManager.loadConfiguration(moduleID);
                      }
                     
                        configurationManager.stopConfiguration(moduleID);

View Full Code Here

        if(!isEmpty(pass)) response.setRenderParameter("repo-pass", pass);
        try {
            //todo: hide this in PortletManager/ManagementHelper
            ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(KernelRegistry.getSingleKernel());
            Artifact artifact = Artifact.create(configId);
            mgr.loadConfiguration(artifact);
            mgr.startConfiguration(artifact);
            return LIST_MODE;
        } catch (Exception e) {
            log.error("Unable to start configuration "+configId, e);
            response.setRenderParameter("configId", configId);
View Full Code Here

            for (int i=0; i<deploymentConfigs.length; i++) {
                String artifactName = deploymentConfigs[i];
                org.apache.geronimo.kernel.repository.Artifact configName =
                        org.apache.geronimo.kernel.repository.Artifact.create(artifactName);
                if (!configurationManager.isLoaded(configName)) {
                    configurationManager.loadConfiguration(configName);
                    configurationManager.startConfiguration(configName);
                }
            }
        } finally {
            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
View Full Code Here

            //saves it.
            //deploymentContext.close();
            kernel.invoke(storeName, "install", new Object[] {configurationData, installDir},
                    new String[] {ConfigurationData.class.getName(), File.class.getName() });

            configurationManager.loadConfiguration(configId);
            configurationManager.startConfiguration(configId);

        } catch (Exception e) {
            log.error("problem", 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

                    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

        ConfigurationData configurationData = new ConfigurationData(configurationId, kernel.getNaming());
        GBeanData mockBean1 = configurationData.addGBean("MyBean", TestGBean.getGBeanInfo());
        mockBean1.setAttribute("value", "1234");

        // load and start the configuration
        configurationManager.loadConfiguration(configurationData);
        configurationManager.startConfiguration(configurationId);

        // invoke GBean directly
        TestGBean testGBean = (TestGBean) kernel.getGBean("MyBean");
        assertEquals("1234", testGBean.getValue());
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.