Examples of Felix


Examples of org.apache.felix.framework.Felix

      configMap.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list);
      configMap.put("felix.log.level", "4");

      // Now create an instance of the framework with
      // our configuration properties and activator.
      felix = new Felix(configMap);
      felix.init();

      // otherProps.put(Constants.FRAMEWORK_STORAGE, "bundles");

       otherProps.put(AutoProcessor.AUTO_DEPLOY_DIR_PROPERY,
View Full Code Here

Examples of org.apache.felix.framework.Felix

       
        // -------------------------------------------------------------------
        // Start up Felix with resolver and shut it down
        // -------------------------------------------------------------------

        felixContainer = new Felix(new StringMap(props, false), null);
        try
        {
      felixContainer.start();
    }
        catch (Exception ex)
View Full Code Here

Examples of org.apache.felix.framework.Felix

    }
   
   
        props.put(Constants.FRAMEWORK_SYSTEMPACKAGES, spkg.toString());

        framework = new Felix(props, null);
        framework.start();
  }
View Full Code Here

Examples of org.apache.felix.framework.Felix

        System.out.println("");
        System.out.println("-------------------------------------------------------");
        System.out.println(" T E S T S");
        System.out.println("-------------------------------------------------------");

        Felix felix = new Felix(felixConf);
        try {
            felix.start();
        } catch (BundleException e) {
            e.printStackTrace();
        }

        getLog().info("Felix started - Waiting for stability");

        waitForStability(felix.getBundleContext());

        getLog().info("Bundle Stability Reached - Waiting for runner service");

        Object runner = waitForRunnerService(felix.getBundleContext());

        if (runner == null) {
            throw new MojoFailureException("Cannot intialize the testing framework");
        }

        getLog().info("Runner Service available");

        invokeRun(runner, felix.getBundleContext());

        try {
            felix.stop();
            felix.waitForStop(5000);
            // Delete felix-cache
            File cache = new File(m_targetDir.getAbsolutePath() + "/felix-cache");
            cache.delete();
        } catch (Exception e) {
            getLog().error(e);
View Full Code Here

Examples of org.apache.felix.framework.Felix

        {
            this.layout = ( FelixLayout ) suppliedLayout;
        }
       
        configationProperties = readConfigProperties();
        instance = new Felix(new StringMap(configationProperties, false ), null );
    }
View Full Code Here

Examples of org.apache.felix.framework.Felix

  public static void main(String[] args) throws Exception {
    try {

      final Map configMap = new HashMap();
      configMap.put(Constants.FRAMEWORK_STORAGE_CLEAN, "onFirstInit");
      m_framework = new Felix(configMap);
      m_framework.init();

      final BundleContext context = m_framework.getBundleContext();

      Bundle provider = context.installBundle("file:bundles/provider-3.0.jar");
View Full Code Here

Examples of org.apache.felix.framework.Felix

        System.out.println("");
        System.out.println("-------------------------------------------------------");
        System.out.println(" T E S T S");       
        System.out.println("-------------------------------------------------------");
       
        Felix felix = new Felix(felixConf);
        try {
            felix.start();
        } catch (BundleException e) {
            e.printStackTrace();
        }
       
        waitForStability(felix.getBundleContext());
       

        Object runner = waitForRunnerService(felix.getBundleContext());
        invokeRun(runner, felix.getBundleContext());
               
        try {
            felix.stop();
            felix.waitForStop(5000);
            // Delete felix-cache
            File cache = new File(m_targetDir.getAbsolutePath() + "/felix-cache");
            cache.delete();
        } catch (Exception e) {
            getLog().error(e);
View Full Code Here

Examples of org.apache.felix.framework.Felix

        List<BundleActivator> activators = new ArrayList<BundleActivator>();
        activators.add(this);
        activators.add(new BootstrapInstaller(logger, resourceProvider));

        // create the framework and start it
        Felix tmpFelix = new Felix(logger, props, activators);
        tmpFelix.start();

        // only assign field if start succeeds
        this.felix = tmpFelix;

        // log sucess message
View Full Code Here

Examples of org.apache.felix.framework.Felix

        props.put("org.osgi.framework.system.packages", systemPackages);

        List<BundleActivator> activators = new ArrayList<BundleActivator>();
        AutoActivator autoActivator = new AutoActivator(props);
        activators.add(autoActivator);
        felix = new Felix(props, activators);
        ((Bundle)felix).start();
        bundleContext = ((Bundle)felix).getBundleContext();
                  
        return bundleContext;
       
View Full Code Here

Examples of org.apache.felix.framework.Felix

        configProps.put(FelixConstants.LOG_LEVEL_PROP, getServletContextParam("struts.osgi.logLevel", "1"));
        configProps.put(FelixConstants.BUNDLE_CLASSPATH, ".");
        configProps.put(FelixConstants.FRAMEWORK_BEGINNING_STARTLEVEL, getServletContextParam("struts.osgi.runLevel", "3"));

        try {
            felix = new Felix(configProps);
            felix.init();
            AutoProcessor.process(configProps, felix.getBundleContext());
            felix.start();

            if (LOG.isTraceEnabled()) {
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.