Package org.osgi.framework

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


          Thread.sleep(100);
          bundle.start();
          Thread.sleep(100);
          bundle.stop();
          Thread.sleep(100);
          bundle.uninstall();
          Thread.sleep(100);
        } catch (InterruptedException ignore) { }
      }
    } catch (BundleException be) {
      be.printStackTrace(System.err);
View Full Code Here


                            updateLife(b, LONG_LIFE);
                        } else if (expire == null) {
                            updateLife(b, SHORT_LIFE);
                        } else if (expire.longValue() < now) {
                            info("uninstalling " + b.getLocation());
                            b.uninstall();
                        }
                    }
                } catch (Exception e) {
                }
            }
View Full Code Here

            updateLife(b, SHORT_LIFE);
            return b;
        } catch (Exception e) {
            error("failed to install " + name);
            try {
                b.uninstall();
            } catch (Exception e1) {
            }
            return null;
        } finally {
            try {
View Full Code Here

    try {
      Bundle bundle = Util.installBundle(bc, "bundleEnd1_test-1.0.0.jar");
      bundle.start();
      bundle.stop();
      bundle.uninstall();
    } catch (BundleException e) {
      e.printStackTrace();
      return false;
    }
       
View Full Code Here

        for (int o = 0; o < locales.length; o++) {
          bundle.getHeaders(locales[o]);
        }
      }
     
      bundle.uninstall();
    } catch (BundleException e) {
      e.printStackTrace();
    }
    return true;
  }
View Full Code Here

        for (int o = 0; o < locales.length; o++) {
          bundle.getHeaders(locales[o]);
        }
      }
     
      bundle.uninstall();
      fragment.uninstall();
    } catch (BundleException e) {
      e.printStackTrace();
    }
    return true;
View Full Code Here

            bundles.removeAll(b);
        }
        for (long bundleId : bundles) {
            Bundle b = getBundleContext().getBundle(bundleId);
            if (b != null) {
                b.uninstall();
            }
        }
        refreshPackages(null);
        callListeners(new FeatureEvent(feature, FeatureEvent.EventType.FeatureUninstalled, false));
        saveState();
View Full Code Here

            // stale bundle, save a copy for rolling back and uninstall it
            String symbolicName = bundleInfo.getSymbolicName();
            try {
                Bundle bundle = target.getBundle(symbolicName);
                if (bundle != null) {
                    bundle.uninstall();
                    addRollback(new InstallBundleRunnable(bundle, target, log));
                }
            }
            catch (Exception be) {
                log.log(LogService.LOG_WARNING, "Bundle '" + symbolicName + "' could not be uninstalled", be);
View Full Code Here

        }
        else
        {
            try
            {
                b.uninstall();
                writeOk();
            }
            catch (BundleException e)
            {
                writeError();
View Full Code Here

        }
        finally
        {
            b.stop();
            b.uninstall();
            f.uninstall();
        }
    }

    private File createBundle(String manifest) throws IOException
    {
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.