Package org.osgi.framework.launch

Examples of org.osgi.framework.launch.Framework.start()


        context = systemBundle.getBundleContext();

        testBundle = context.getBundle(testBundleId);
        assertNotNull(testBundleId);

        framework.start();
        testBundle.start();

        assertEquals(Bundle.ACTIVE, framework.getState());
        assertEquals(Bundle.ACTIVE, testBundle.getState());
View Full Code Here


        assertNotNull(frameworkEvent);
        assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
        assertSame(systemBundle, frameworkEvent.getBundle());

        framework.start();

        framework.stop();

        Thread.sleep(1);
View Full Code Here

        if (bundleProvisioner.hasAnyThingChanged()) {
            System.out.println("Refreshing framework");
            bundleProvisioner.refresh();
        }
        bundleProvisioner.startBundles();
        f.start();
        long t4 = System.currentTimeMillis();
        logger.log(Level.INFO, LogFacade.BUNDLE_STARTING_TIME, (t4-t3));
        logger.log(Level.INFO, LogFacade.TOTAL_START_TIME, (t4-t0));
        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
View Full Code Here

        if (bundleProvisioner.hasAnyThingChanged()) {
            System.out.println("Refreshing framework");
            bundleProvisioner.refresh();
        }
        bundleProvisioner.startBundles();
        f.start();
        long t4 = System.currentTimeMillis();
        logger.logp(Level.INFO, "BundleProvisioner", "main", "time taken to finish starting bundles = {0} ms",
                new Object[]{t4 - t3});
        logger.logp(Level.INFO, "BundleProvisioner", "main", "total time taken to start = {0}", new Object[]{t4-t0});
        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
View Full Code Here

        if (bundleProvisioner.hasAnyThingChanged()) {
            System.out.println("Refreshing framework");
            bundleProvisioner.refresh();
        }
        bundleProvisioner.startBundles();
        f.start();
        long t4 = System.currentTimeMillis();
        logger.log(Level.INFO, LogFacade.BUNDLE_STARTING_TIME, (t4-t3));
        logger.log(Level.INFO, LogFacade.TOTAL_START_TIME, (t4-t0));
        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
View Full Code Here

         */
        resetFrameworkProperties();

        ServiceLoader<FrameworkFactory> loader = ServiceLoader.load(FrameworkFactory.class);
        Framework framework = loader.iterator().next().newFramework(properties);
        framework.start();
        //enable mvn url handling
//        new org.ops4j.pax.url.mvn.internal.Activator().start(framework.getBundleContext());
        //don't allow mvn urls
        System.setProperty("geronimo.build.car", "true");

View Full Code Here

            for (BundleProvider bundleProvider : bundleProviders) {
                installBundles(context, bundleProvider);
            }

            framework.start();

            logVerbose("Startup complete...");

            framework.waitForStop(0);
        }
View Full Code Here

        map.put(FelixConstants.LOG_LOGGER_PROP, new FelixLogger());

        // Create the framework instance
        Framework framework = new Felix(map);
        framework.init();
        framework.start();

        syscontext = framework.getBundleContext();
    }

    @Test
View Full Code Here

        if (framework == null) {
            throw new RuntimeException("Cannot find an OSGi framework");
        }
        try {
            framework.start();
        } catch (BundleException e) {
            throw new RuntimeException("Cannot start OSGi framework", e);
        }
       
        BundleContext bc = framework.getBundleContext();
View Full Code Here

      pojoSrConfig.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, new ClasspathScanner());
     
      // Start PojoSR 'framework'
      Framework framework = new PojoServiceRegistryFactoryImpl().newFramework(pojoSrConfig);
      framework.init();
      framework.start();
     
      // Look for indexer and run index generation
      ServiceTracker tracker = new ServiceTracker(framework.getBundleContext(), ResourceIndexer.class.getName(), null);
      tracker.open();
      ResourceIndexer index = (ResourceIndexer) tracker.waitForService(1000);
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.