Package org.apache.geronimo.kernel.config

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


        }
        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


                        continue;
                    }

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

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

        ConfigurationData configurationData = new ConfigurationData(new Artifact("test", "test", "", "car"), kernel.getNaming());
        configurationData.setBundleContext(bundleContext);
        configurationData.addGBean("GlobalContext", GlobalContextGBean.class);
        configurationData.addGBean("JavaComp", JavaCompContextGBean.class);

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

    }

    protected void tearDown() throws Exception {
View Full Code Here

        ds2Binding.setAttribute("name", "ds2");
        ds2Binding.setAttribute("abstractNameQuery", new AbstractNameQuery(null,
                Collections.singletonMap("name", "ds2"),
                DataSource.class.getName()));

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

        DataSource ds1 = (DataSource) kernel.getGBean(ds1Name);
        DataSource ds2 = (DataSource) kernel.getGBean(ds2Name);
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);
            for (Iterator iterator = list.iterator(); iterator.hasNext();) {
                Artifact configID = Artifact.create((String)iterator.next());
                if (!configurationManager.isLoaded(configID)) {
                    configurationManager.loadConfiguration(configID);
                }

                configurationManager.startConfiguration(configID);
            }
        } catch (DeploymentException e) {
View Full Code Here

        configurationData.setBundleContext(bundleContext);
        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

            //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

            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

            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

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.