Package org.osgi.framework.launch

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


        }
        finally
        {
            try
            {
                f.stop();
            }
            catch (Throwable t)
            {
            }
        }
View Full Code Here


        Class clazz2 = cl2.loadClass(URLHandlersTest.class.getName());

        clazz2.getMethod("testURLHandlers").invoke(clazz2.newInstance());
        bundle.stop();
        bundle.start();
        f.stop();
    }

    public static class DelegatingClassLoader extends ClassLoader
    {
        private final Object m_lock = new Object();
View Full Code Here

            t1 = System.currentTimeMillis();

            assertEquals(Bundle.ACTIVE, bundle.getState());
            assertTrue((t1 - t0) > DELAY / 2);
        } finally {
            f.stop();
            Thread.sleep(DELAY);
            deleteDir(cacheDir);
        }
    }
View Full Code Here

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

                    myFramework.stop();
                    myFramework.waitForStop(0);

                } catch (BundleException be) {

                    // may be thrown by stop, log but continue
View Full Code Here

      if (!(allBundles[i] instanceof CompositeBundle))
        continue;
      CompositeBundle composite = (CompositeBundle) allBundles[i];
      try {
        Framework child = composite.getCompositeFramework();
        child.stop();
        // need to wait for each child to stop
        child.waitForStop(30000);
        // TODO need to figure out a way to invalid the child
      } catch (Throwable t) {
        // TODO consider logging
View Full Code Here

            t1 = System.currentTimeMillis();

            assertEquals(Bundle.ACTIVE, bundle.getState());
            assertTrue((t1 - t0) > DELAY / 2);
        } finally {
            f.stop();
            deleteDir(cacheDir);
        }
    }

    private static File createBundle(String manifest, File tempDir) throws IOException
View Full Code Here

        // Generate expanded so we can use Maven to generate the archive
        boot.setExpanded(true);

        boot.bootstrap();

        framework.stop();
        getLog().debug("Waiting for shutdown (up to 5 minutes)...");
        framework.waitForStop(60 * 5 * 1000);
    }

    //
View Full Code Here

        invokeDeployer(kernel, deployer, targetConfigStoreAName.toString());
        //use a fresh kernel for each module
        kernel.shutdown();
        kernel = null;
        Framework framework = (Framework) bundleContext.getBundle();
        framework.stop();
        getLog().debug("Waiting for shutdown (up to 5 minutes)...");
        framework.waitForStop(60 * 5 * 1000);
        bundleContext = null;
    }

View Full Code Here

        }
        catch (BundleException e)
        {
        }

        framework.stop();

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

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

        }

        testBundle = context.getBundle(testBundleId);
        assertNull(testBundle);

        framework.stop();

        framework.init();

        systemBundle = framework.getBundleContext().getBundle(0);
        context = systemBundle.getBundleContext();
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.