Package org.osgi.framework.launch

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


        File bundle = createBundle(mf);

        Framework f = new Felix(params);
        f.init();
        f.getBundleContext().installBundle(bundle.toURI().toString());
        f.start();

        Bundle[] arr = f.getBundleContext().getBundles();
        assertEquals("Two, system and mine: " + Arrays.toString(arr), 2, arr.length);
        Class c = arr[1].loadClass("boot.test.Test");
        assertNotNull("Class loaded", c);
View Full Code Here


        File bundleFile = createBundle(mf, TestURLHandlersActivator.class);

        Framework f = createFramework();
        f.init();
        f.start();

        try
        {
            final Bundle bundle = f.getBundleContext().installBundle(bundleFile.toURI().toString());
            bundle.start();
View Full Code Here

        DelegatingClassLoader cl1 = new DelegatingClassLoader(this.getClass().getClassLoader());
        DelegatingClassLoader cl2 = new DelegatingClassLoader(this.getClass().getClassLoader());

        Framework f = createFramework();
        f.init();
        f.start();

        String mf = "Bundle-SymbolicName: url.test\n"
            + "Bundle-Version: 1.0.0\n"
            + "Bundle-ManifestVersion: 2\n"
            + "Import-Package: org.osgi.framework\n"
View Full Code Here

            + "Import-Package: org.osgi.framework\n";
        File bundleFile = createBundle(mf, cacheDir);

        Framework f = new Felix(params);
        f.init();
        f.start();

        try {
            final Bundle bundle = f.getBundleContext().installBundle(bundleFile.toURI().toString());

            new Thread()
View Full Code Here

            }

            new DefaultStartupHandler(tmpFramework.getBundleContext(), logger, startupManager);

            // finally start
            tmpFramework.start();

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

         */
        resetFrameworkProperties();

        ServiceLoader<FrameworkFactory> loader = ServiceLoader.load(FrameworkFactory.class);
        Framework framework = loader.iterator().next().newFramework(properties);
        framework.start();
        //enable mvn url handling
//        new org.ops4j.pax.url.mvn.internal.Activator().start(framework.getBundleContext());
        //don't allow mvn urls
        if (systemProperties == null) {
            systemProperties = new HashMap<String, String>();
View Full Code Here

            + "Import-Package: org.osgi.framework\n";
        File bundleFile = createBundle(mf, cacheDir);

        Framework f = new Felix(params);
        f.init();
        f.start();

        try {
            final Bundle bundle = f.getBundleContext().installBundle(bundleFile.toURI().toString());

            new Thread()
View Full Code Here

            Map<String, Object> frameworkProperties = createFrameworkProperties();
            if (m_verbose)
                System.out.println("Launching OSGi framework.. " + frameworkProperties);
            FrameworkFactory factory = createFrameworkFactory();
            Framework framework = factory.newFramework(frameworkProperties);
            framework.start();

            if (m_verbose)
                System.out.println("Configuring Management Agent.. " + m_configuration);
            BundleContext context = framework.getBundleContext();
            ServiceReference[] references = context.getServiceReferences(ManagementAgentFactory.class.getName(), null);
View Full Code Here

        Map frameworkProperties = createFrameworkProperties();
        FrameworkFactory factory = createFrameworkFactory();

        Framework framework = factory.newFramework(frameworkProperties);

        framework.start();

        try {
            framework.waitForStop(0);
        }
        finally {
View Full Code Here

         */
        resetFrameworkProperties();

        ServiceLoader<FrameworkFactory> loader = ServiceLoader.load(FrameworkFactory.class);
        Framework framework = loader.iterator().next().newFramework(properties);
        framework.start();
        //enable mvn url handling
//        new org.ops4j.pax.url.mvn.internal.Activator().start(framework.getBundleContext());
        //don't allow mvn urls
        if (systemProperties == null) {
            systemProperties = new HashMap<String, String>();
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.