Examples of Felix


Examples of org.apache.felix.framework.Felix

            _logger.info("Auto deploying bundles from directory " + pluginPath);
            configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
            configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);

            // Start plugin manager
            _felix = new Felix(configMap);
            try
            {
                _logger.info("Starting plugin manager framework");
                _felix.init();
                process(configMap, _felix.getBundleContext());
View Full Code Here

Examples of org.apache.felix.framework.Felix

            config.put( FELIX_CACHE_LOCKING, "true" );
            LOG.info( "Using default for cache locking: enabled" );
        }
       
        // instantiate and start up felix
        felix = new Felix( config );
       
        try
        {
            felix.start();
        }
View Full Code Here

Examples of org.apache.felix.framework.Felix

        _logger.info("Auto deploying bundles from directory " + pluginPath);
        configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
        configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);       
       
        // Start plugin manager and trackers
        _felix = new Felix(configMap);
        try
        {
            _logger.info("Starting plugin manager...");
            _felix.init();
          process(configMap, _felix.getBundleContext());
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

        try {
            List<BundleActivator> list = new ArrayList<BundleActivator>();
            list.add(new AutoActivator(configProps));
            configProps.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list);

            felix = new Felix(configProps);
            felix.start();
            if (LOG.isTraceEnabled())
                LOG.trace("Apache Felix is running");
        }
        catch (Exception ex) {
View Full Code Here

Examples of org.apache.felix.framework.Felix

            _logger.info("Auto deploying bundles from directory " + pluginPath);
            configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
            configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);

            // Start plugin manager and trackers
            _felix = new Felix(configMap);
            try
            {
                _logger.info("Starting plugin manager...");
                _felix.init();
                process(configMap, _felix.getBundleContext());
View Full Code Here

Examples of org.apache.felix.framework.Felix

      tempFile.delete();
      tempFile.mkdir();
      tempFile.deleteOnExit();
      configMap.put("org.osgi.framework.storage",
          tempFile.getAbsolutePath());
      Felix felix = new Felix(configMap);

      felix.start();
      final BundleContext bundleContext = felix.getBundleContext();

      Set<Bundle> installedBundles = new HashSet<Bundle>();
      for (Object dep : mojoExecution.getMojoDescriptor().getPluginDescriptor().getIntroducedDependencyArtifacts()) {
        Artifact artifact = (Artifact) dep;
        log.info("Dep-artifact " + artifact + " scope " + artifact.getScope());
View Full Code Here

Examples of org.apache.felix.framework.Felix

        result.add(new AllPermission());
        return result;
      }
    });
    System.setSecurityManager(new SecurityManager());
    felixInstance = new Felix(configProps);
    System.out.println("starting felix");
    felixInstance.start();
    final String revertParam = arguments.getRevertParam();
    final PathNode bundlesRoot = PathNodeFactory.getPathNode(Main.class.getResource("/bundles"));
    final BundleContext bundleContext = felixInstance.getBundleContext();
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-1.0.jar");
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-2.0.jar");
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.