Examples of PapooseFrameworkFactory


Examples of org.papoose.core.PapooseFrameworkFactory

        String location = f.toURI().normalize().toString();

        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(Constants.FRAMEWORK_STORAGE, "target/papoose");

        final FrameworkFactory factory = new PapooseFrameworkFactory();
        Framework framework = factory.newFramework(configuration);

        framework.init();

        Bundle systemBundle = framework.getBundleContext().getBundle(0);
        BundleContext context = systemBundle.getBundleContext();

        Bundle testBundle = context.installBundle(location);

        long testBundleId = testBundle.getBundleId();

        assertTrue(testBundleId > 0);

        try
        {
            framework.uninstall();
            fail("Should have thrown an exception");
        }
        catch (BundleException e)
        {
        }

        framework.stop();

        framework = factory.newFramework(configuration);
        framework.init();

        systemBundle = framework.getBundleContext().getBundle(0);
        context = systemBundle.getBundleContext();
View Full Code Here

Examples of org.papoose.core.PapooseFrameworkFactory

    public void test() throws Exception
    {
        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(Constants.FRAMEWORK_STORAGE, "target/papoose");

        FrameworkFactory factory = new PapooseFrameworkFactory();
        final Framework framework = factory.newFramework(configuration);

        FrameworkEvent frameworkEvent = framework.waitForStop(0);

        assertNotNull(frameworkEvent);
        assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
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.