Examples of uninstall()


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

            bundles.removeAll(b);
        }
        for (long bundleId : bundles) {
            Bundle b = getBundleContext().getBundle(bundleId);
            if (b != null) {
                b.uninstall();
            }
        }
        if (refresh) {
            if (verbose) {
                System.out.println("Refreshing packages");
View Full Code Here

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

   @Override
   public void uninstallBundle(BundleHandle handle) throws BundleException
   {
      Bundle bundle = getBundle(handle);
      bundle.uninstall();
   }

   @Override
   public int getBundleState(BundleHandle handle)
   {
View Full Code Here

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

        assertTrue(testBundleId > 0);

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

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

                    try
                    {
                        final DeploymentPackage pck = admin.getDeploymentPackage(pckId);
                        if (pck != null)
                        {
                            pck.uninstall();
                        }
                    }
                    catch ( /*Deployment*/Exception e)
                    {
                        throw new ServletException("Unable to undeploy package.", e);
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

                }
            }
        } else { // uninstall
            if ( dp != null ) {
                try {
                    dp.uninstall();
                } catch (final DeploymentException e) {
                    logger.error("Unable to uninstall deployment package {} from resource {}", symbolicName, tr);
                }
            } else {
                logger.info("Unable to find deployment package with symbolic name {} for uninstalling.",
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

        assertTrue(isBundleActive(dp.getBundle(getSymbolicName("bundle1"))));
        assertFalse(isBundleActive(dp.getBundle(getSymbolicName("fragment1"))));

        // Should succeed...
        dp.uninstall();

        assertEquals("Expected no deployment package?!", 0, countDeploymentPackages());

        // Both bundles should be uninstalled...
        assertBundleNotExists(getSymbolicName("bundle1"), "1.0.0");
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

        assertBundleExists(getSymbolicName("bundle3"), "1.0.0");

        assertEquals("Expected a single deployment package?!", 1, countDeploymentPackages());

        // Should succeed...
        dp.uninstall();

        assertEquals("Expected no deployment package?!", 0, countDeploymentPackages());

        assertBundleNotExists(getSymbolicName("rp1"), "1.0.0");
        assertBundleNotExists(getSymbolicName("bundle3"), "1.0.0");
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

        assertEquals("Expected no deployment package?!", 1, countDeploymentPackages());
       
        System.setProperty("rp1", "commit");

        dp.uninstall();

        assertTrue("No bundles should be started! " + getCurrentBundles(), getCurrentBundles().isEmpty());

        assertEquals("Expected no deployment package?!", 0, countDeploymentPackages());
    }
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

        assertEquals("Expected no deployment package?!", 1, countDeploymentPackages());
       
        System.setProperty("rp1", "dropAllResources");

        try {
            dp.uninstall();
            fail("Expected uninstall to fail and rollback!");
        }
        catch (DeploymentException exception) {
            // Ok; expected
            assertDeploymentException(CODE_OTHER_ERROR, exception);
View Full Code Here

Examples of org.osgi.service.deploymentadmin.DeploymentPackage.uninstall()

        assertEquals("Expected no deployment package?!", 1, countDeploymentPackages());
       
        System.setProperty("rp1", "prepare");

        try {
            dp.uninstall();
            fail("Expected uninstall to fail and rollback!");
        }
        catch (DeploymentException exception) {
            // Ok; expected
            assertDeploymentException(CODE_COMMIT_ERROR, exception);
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.