Package org.apache.geronimo.kernel.config

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


        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


        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

                    do {
                        unloadedConfigsCount = unloadedConfigs.size();
                        LinkedHashSet<Artifact> sorted = configurationManager.sort(unloadedConfigs, lifecycleMonitor);
                        for (Artifact configID : sorted) {
                            monitor.moduleLoading(configID);
                            configurationManager.loadConfiguration(configID, lifecycleMonitor);
                            monitor.moduleLoaded(configID);
                            monitor.moduleStarting(configID);
                            configurationManager.startConfiguration(configID, lifecycleMonitor);
                            monitor.moduleStarted(configID);
                        }
View Full Code Here

        }
        for (Artifact artifact: results.getInstalledConfigIDs()) {
            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

            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

        }

        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        try {
            for (Artifact config : configs) {
                configurationManager.loadConfiguration(config);
                configurationManager.startConfiguration(config);
            }
        } finally {
            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
        }
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);
                            unloadedConfigs.remove(configID);
                            monitor.moduleLoaded(configID);
                            monitor.moduleStarting(configID);
                            configurationManager.startConfiguration(configID, lifecycleMonitor);
                            monitor.moduleStarted(configID);
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

        }
       
        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        try {
            for (Artifact config : configs) {
                configurationManager.loadConfiguration(config);
                configurationManager.startConfiguration(config);
            }
        } finally {
            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
        }
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

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.