Package org.apache.felix.framework

Examples of org.apache.felix.framework.Felix$SystemBundleActivator


        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


        _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

        configMap.put("org.osgi.framework.storage.clean", "onFirstInit");
        configMap.put("felix.cache.locking", "false");

        try {
            if (felix == null) {
                felix = new Felix(configMap);
                felix.start();
            }
            //refresh();
            LogUtil.info(PluginManager.class.getName(), "PluginManager initialized");
        } catch (Exception ex) {
View Full Code Here

            _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

        activations.add(activator);
        activations.add(main);

        try {
            // Start up the OSGI framework
            m_felix = new Felix(new StringMap(m_configProps, false), activations);
            m_felix.start();
        }
        catch (Exception ex) {
            System.err.println("Could not create framework: " + ex);
            ex.printStackTrace();
View Full Code Here

    }

    private void doStart()
        throws Exception
    {
        Felix tmp = new Felix(createConfig());
        printInfo();
        tmp.start();
        this.felix = tmp;
        log("OSGi framework started", null);
    }
View Full Code Here

    putActivatorConfig(registry, configMap);

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
      Thread.currentThread().setContextClassLoader(Felix.class.getClassLoader());
      felix = new Felix(configMap);
      felix.init();
      felix.start();
    }
    finally {
      Thread.currentThread().setContextClassLoader(cl);
View Full Code Here

    putActivatorConfig(registry, configMap);

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
      Thread.currentThread().setContextClassLoader(Felix.class.getClassLoader());
      felix = new Felix(configMap);
      felix.init();
      felix.start();
    }
    finally {
      Thread.currentThread().setContextClassLoader(cl);
View Full Code Here

        properties.setProperty("org.osgi.framework.system.packages.extra", "org.apache.karaf.jaas.boot;version=\"2.4.0.SNAPSHOT\",org.apache.karaf.jaas.boot.principal;version=\"2.4.0.SNAPSHOT\",org.apache.karaf.management.boot;version=\"2.4.0.SNAPSHOT\"");
        properties.setProperty("org.osgi.framework.system.capabilities.extra",
                        "osgi.service;effective:=active;objectClass=org.osgi.service.packageadmin.PackageAdmin," +
                        "osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel," +
                        "osgi.service;effective:=active;objectClass=org.osgi.service.url.URLHandlers");
        Framework felix = new Felix(properties);
        Collection<Resource> resources = builder.resolve(felix.adapt(BundleRevision.class), false);

        for (Resource resource : resources) {
            System.out.println("Resource: " + getUri(resource));
        }
View Full Code Here

            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();
        }
        catch ( BundleException e )
View Full Code Here

TOP

Related Classes of org.apache.felix.framework.Felix$SystemBundleActivator

Copyright © 2018 www.massapicom. 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.