Package org.osgi.framework.launch

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()


    }

    @Test
    public void provisionMvnUrl() throws BundleException, IOException {
        FrameworkFactory frameworkFactory = FrameworkFactoryFinder.loadSingleFrameworkFactory();
        Framework framework = frameworkFactory.newFramework(props);
        provisionToFramework(framework);
    }

    private void provisionToFramework(Framework framework) throws BundleException, IOException {
        framework.start();
View Full Code Here


    // @Test
    public void starting() throws IOException {
        FrameworkFactory ff = mock(FrameworkFactory.class);
        Framework fw = mock(Framework.class);
        when(ff.newFramework(Matchers.<Map<String, String>> anyObject())).thenReturn(fw);
        ExamSystem system = mock(ExamSystem.class);

        NativeTestContainer container = new NativeTestContainer(system, ff);
        container.start();
        verifyNoMoreInteractions(ff);
View Full Code Here

        ArtifactResolver resolver = new SimpleMavenResolver(bundleDirs);

        // Start up the OSGI framework
        ClassLoader classLoader = createClassLoader(resolver);
        FrameworkFactory factory = loadFrameworkFactory(classLoader);
        framework = factory.newFramework(config.props);

        // Hack to set felix logger
        try {
            if (framework.getClass().getName().startsWith("org.apache.felix.")) {
                Field field = framework.getClass().getDeclaredField("m_logger");
View Full Code Here

    // **** END OF CHANGE FROM ORIGINAL FELIX VERSION ****

//    try {
      // Create an instance of the framework.
      FrameworkFactory factory = getFrameworkFactory();
      m_fwk = factory.newFramework(configProps);
      // Initialize the framework, but don't start it yet.
      m_fwk.init();
      // Use the system bundle context to process the auto-deploy
      // and auto-install/auto-start properties.
      AutoProcessor.process(configProps, m_fwk.getBundleContext(), rooVersion);
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.