Package org.osgi.service.cm

Examples of org.osgi.service.cm.Configuration.update()


        }
    // First inject a configuration triggering an exception of the validate method.
    props.put("controller", "false");

    try {
            configuration.update(props);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        String pid = configuration.getPid();
View Full Code Here


    // Reconfigure
    props = new Properties();
    props.put("controller", "true");

    try {
            configuration.update(props);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        pid = configuration.getPid();
View Full Code Here

        Dictionary props = new Hashtable();
        props.put("stopUnaffectedBundle", Boolean.FALSE);
        props.put("allowForeignCustomizers", Boolean.FALSE);

        Configuration config = m_configAdmin.getConfiguration("org.apache.felix.deploymentadmin", null);
        config.update(props);

        Thread.sleep(100);

        // This test case will only work if stopUnaffectedBundle is set to 'false'...
        try {
View Full Code Here

            ConfigurationAdmin configAdmin = CamelBlueprintHelper.getOsgiService(answer, ConfigurationAdmin.class);
            if (configAdmin != null) {
                // ensure we update
                Configuration config = configAdmin.getConfiguration(pid);
                log.info("Updating ConfigAdmin {} by overriding properties {}", config, props);
                config.update(props);
            }
        }

        // allow end user to override properties
        String pid = useOverridePropertiesWithConfigAdmin(props);
View Full Code Here

            Configuration config = configAdmin.getConfiguration(pid);
            if (config == null) {
                throw new IllegalArgumentException("Cannot find configuration with pid " + pid + " in OSGi ConfigurationAdmin service.");
            }
            log.info("Updating ConfigAdmin {} by overriding properties {}", config, props);
            config.update(props);
        }
        return answer;
    }

    @Before
View Full Code Here

        }
        // First inject a configuration triggering an exception of the validate method.
        props.put("prop", "KO");

        try {
            configuration.update(props);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        String pid = configuration.getPid();
View Full Code Here

        // Reconfigure
        props = new Properties();
        props.put("prop", "OK");

        try {
            configuration.update(props);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        pid = configuration.getPid();
View Full Code Here

        }
        // First inject a configuration triggering an exception of the validate method.
        props.put("prop", "KO");

        try {
            configuration.update(props);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        String pid = configuration.getPid();
View Full Code Here

        // Reconfigure
        props = new Properties();
        props.put("prop", "OK");

        try {
            configuration.update(props);
            grace();
        } catch (IOException e) {
            fail(e.getMessage());
        }
View Full Code Here

        }
        // First inject a configuration triggering an exception of the validate method.
        props.put("controller", "false");

        try {
            configuration.update(props);
            grace();
        } catch (IOException e) {
            fail(e.getMessage());
        }
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.