Package org.osgi.framework

Examples of org.osgi.framework.Bundle.stop()


 
 
  @After
  public void restartTestBundles() throws BundleException {
    Bundle b = context().getBundleByName("org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle");
    b.stop();
    b.start();
   
    b = context().getBundleByName("org.apache.aries.jpa.container");
    b.stop();
    b.start();
View Full Code Here


    Bundle b = context().getBundleByName("org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle");
    b.stop();
    b.start();
   
    b = context().getBundleByName("org.apache.aries.jpa.container");
    b.stop();
    b.start();
   
    b = context().getBundleByName("org.apache.aries.jpa.container.context");
    b.stop();
    b.start();
View Full Code Here

    b = context().getBundleByName("org.apache.aries.jpa.container");
    b.stop();
    b.start();
   
    b = context().getBundleByName("org.apache.aries.jpa.container.context");
    b.stop();
    b.start();
  }
 
  @Test
  public void testSimpleContextQuiesce() throws Exception {
View Full Code Here

   
    assertNull("No context should exist",refs);
   
    //Restart the bundle to check the context gets re-registered
    Bundle b = context().getBundleByName("org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle");
    b.stop();
    b.start();
   
    context().getService(EntityManagerFactory.class, "(&(osgi.unit.name=test-unit)("
        + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true)" +
      "(" + PersistenceContextProvider.PROXY_FACTORY_EMF_ATTRIBUTE + "=*))");
 
View Full Code Here

   
   
    //Restart the bundle to check the context gets re-registered, then ensure it isn't
    //tidied up immediately again!
    Bundle b = context().getBundleByName("org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle");
    b.stop();
    b.start();
   
    emf = context().getService(EntityManagerFactory.class, "(&(osgi.unit.name=test-unit)("
        + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true)" +
      "(" + PersistenceContextProvider.PROXY_FACTORY_EMF_ATTRIBUTE + "=*))");
 
View Full Code Here

   
    assertNull("No unit should exist",refs);
   
    //Restart the bundle to check the unit gets re-registered
    Bundle b = context().getBundleByName("org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle");
    b.stop();
    b.start();
   
    context().getService(EntityManagerFactory.class, "(&(osgi.unit.name=test-unit)("
        + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true))");
  }
View Full Code Here

                        .setRequired(true)
                        .setCallbacks("add", "change", "remove"));
                   
        Bundle dmtest = getBundle("org.apache.felix.dependencymanager.shell");
        try {
            dmtest.stop();
        } catch (BundleException e1) {
            Assert.fail("couold not find dependencymanager shell bundle");
        }
       
        m.add(a);
View Full Code Here

        ServiceReference reference = null;
        RefreshListener refreshListener = null;
        try {
            // stop the bundle
            targetBundle.stop();

            // update the bundle
            FileInputStream fi = null;
            try {
                fi = new FileInputStream(bundleFile);
View Full Code Here

            try {
                Bundle bundle = bundles.remove(configurationId);
                if (bundle != null) {
                    if (BundleUtils.canStop(bundle)) {
                        bundle.stop(Bundle.STOP_TRANSIENT);
                    }
                    if (BundleUtils.canUninstall(bundle)) {
                        bundle.uninstall();
                    }
                }
View Full Code Here

                                       
                    if (START_OPERATION.equals(operation)) {
                        bundle.start();
                        addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.bundlemanager.info.start", symbolicName, id));
                    } else if (STOP_OPERATION.equals(operation)) {
                        bundle.stop();
                        addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.bundlemanager.info.stop", symbolicName, id));
                    } else if (UNINSTALL_OPERATION.equals(operation)) {
                        bundle.uninstall();
                        addInfoMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.bundlemanager.info.uninstall", symbolicName, id));
                    } else if (UPDATE_OPERATION.equals(operation)) {
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.