Examples of Felix


Examples of org.apache.felix.framework.Felix

        // create the framework and start it
        Map<String, Object> felixProps = new HashMap<String, Object>(props);
        felixProps.put(FelixConstants.LOG_LOGGER_PROP, logger);
        felixProps.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
        try {
            Felix tmpFelix = new SlingFelix(notifiable, felixProps);
            tmpFelix.init(); // call needed due to FELIX-910
            tmpFelix.start();

            // only assign field if start succeeds
            this.felix = tmpFelix;
        } catch (BundleException be) {
            throw be;
View Full Code Here

Examples of org.apache.felix.framework.Felix

     * delegatee servlet if one is set at all.
     */
    public final void destroy() {
        if (felix != null) {
            // get a private copy of the reference and remove the class ref
            Felix myFelix;
            synchronized (this) {
                myFelix = felix;
                felix = null;
            }

            // shutdown the Felix container
            if (myFelix != null) {
                logger.log(Logger.LOG_INFO, "Shutting down Sling");
                try {

                    myFelix.stop();
                    myFelix.waitForStop(0);

                } catch (BundleException be) {

                    // may be thrown by stop, log but continue
                    logger.log(Logger.LOG_ERROR,
View Full Code Here

Examples of org.apache.felix.framework.Felix

    }

    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

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

        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);
View Full Code Here

Examples of org.apache.felix.framework.Felix

            + "javax.xml.transform, " + "javax.xml.transform.dom, "
            + "javax.xml.transform.stream, " + "org.objectweb.asm, "
            + "junit.framework");

    List activators = new ArrayList();
    Felix felix = new Felix(props, activators);
    felix.start();
    bundleContext = felix.getBundleContext();
  }
View Full Code Here

Examples of org.apache.felix.framework.Felix

            defaultStartLevel = Integer.parseInt(m_configProps.getProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL));
            lockStartLevel = Integer.parseInt(m_configProps.getProperty(PROPERTY_LOCK_LEVEL, Integer.toString(lockStartLevel)));
            lockDelay = Integer.parseInt(m_configProps.getProperty(PROPERTY_LOCK_DELAY, Integer.toString(lockDelay)));
            m_configProps.setProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, Integer.toString(lockStartLevel));
            // Start up the OSGI framework
            m_felix = new Felix(new StringMap(m_configProps, false));
            m_felix.start();
            // Start lock monitor
            new Thread() {
                public void run() {
                    lock(m_configProps);
View Full Code Here

Examples of org.apache.felix.framework.Felix

    }

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

Examples of org.apache.felix.framework.Felix

        list.add(getActivator());

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

        // Now start Felix instance.
        felix.start();

        //tccl = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.apache.felix.framework.Felix

        configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, "target/.felix");
        List<BundleActivator> list = new ArrayList<BundleActivator>();

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

        // Now start Felix instance.
        felix.start();
        BundleContext context = felix.getBundleContext();
        InputStream is = OSGiServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle.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.