Package org.osgi.framework.launch

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


      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


      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

    }

    Framework framework = fwkFactory.newFramework(config);
    logger.info("Created framework");
    try {
      framework.start();
      logger.info("Started framework");
    } catch (BundleException e) {
      logger.log(Level.SEVERE, "Error starting framework.", e);
      return null;
    }
View Full Code Here

   public void start() throws LifecycleException
   {
      try
      {
         Framework framework = frameworkInst.get();
         framework.start();
         bundleContextInst.set(framework.getBundleContext());
        
         Bundle[] bundles = framework.getBundleContext().getBundles();
         if (getInstalledBundle(bundles, "osgi.cmpn") == null)
            installBundle("org.osgi.compendium", false);
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

    }

    public void start() throws LifecycleException {
        try {
            Framework framework = frameworkInst.get();
            framework.start();
            bundleContextInst.set(framework.getBundleContext());

            Bundle[] bundles = framework.getBundleContext().getBundles();
            if (getInstalledBundle(bundles, "arquillian-osgi-bundle") == null) {
                // Note, the bundle does not have an ImplementationVersion, we use the one of the container.
View Full Code Here

        props.put("osgi.clean", "true");
        props.put("osgi.dev", "target/classes");

        FrameworkFactory frameworkFactory = FrameworkFactoryFinder.loadSingleFrameworkFactory();
        Framework framework = frameworkFactory.newFramework(props);
        framework.start();
        BundleContext bc = framework.getBundleContext();
        assertNotNull(bc);

        String reference = "reference:file:" + PathUtils.getBaseDir()
            + "/target/pax-exam-sample9-pde";
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.