Package org.osgi.framework

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


        // ==> call back with null.
        TestCase.assertNull( tester2.props );
        TestCase.assertEquals( 2, tester2.numManagedServiceUpdatedCalls );

        // 7. uninstall Bundle A for cleanup.
        bundleA.uninstall();
        delay();

        // Test 2

        // 8. BundleA registers ManagedService with pid1.
View Full Code Here


        }
        finally
        {
            if ( bundle2 != null )
            {
                bundle2.uninstall();
            }
        }
    }

View Full Code Here

        }
        finally
        {
            if ( bundle2 != null )
            {
                bundle2.uninstall();
            }
        }
    }

}
View Full Code Here

        }
        finally
        {
            if ( bundle2 != null )
            {
                bundle2.uninstall();
            }
        }
    }

View Full Code Here

        }
        finally
        {
            if ( bundle2 != null )
            {
                bundle2.uninstall();
            }
        }
    }

}
View Full Code Here

                else if ( "uninstall".equals( action ) )
                {
                    // uninstall bundle
                    try
                    {
                        bundle.uninstall();
                    }
                    catch ( BundleException be )
                    {
                        bundleException = be;
                        log( "Cannot uninstall", be );
View Full Code Here

            if (!bundleInfo.isCustomizer() && source.getBundleInfoByName(symbolicName) == null) {
                // stale bundle, save a copy for rolling back and uninstall it
                try {
                    Bundle bundle = target.getBundle(symbolicName);
                    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

        final int state = b.getState();
        try {
            if (state == Bundle.ACTIVE || state == Bundle.STARTING) {
              b.stop();
            }
            b.uninstall();
            ctx.log("Uninstalled bundle {} from resource {}", b, getResource());
            // if the bundle exported packages, we need to refresh
            if ( BundleUtil.getFragmentHostHeader(b) == null ) {
                RefreshBundlesTask.markBundleForRefresh(ctx, this.getTaskSupport(), b);
            }
View Full Code Here

                sleep(10L);
            }
        } finally {
            is.close();
            if (b != null) {
                b.uninstall();
            }
        }
    }

    /**
 
View Full Code Here

        awaitRefreshPackagesEvent();

        assertTrue("Two bundles should be started!", getCurrentBundles().size() == 2);

        Bundle rpBundle = dp.getBundle(getSymbolicName("rp1"));
        rpBundle.uninstall();

        assertTrue("One bundle should be started!", getCurrentBundles().size() == 1);

        assertEquals("Expected no deployment package?!", 1, countDeploymentPackages());
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.