Package org.osgi.framework

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


     * Sets up MongoDB and tries to clear the useradmin collection. When this fails, it is assumed that no MongoDB service is available.
     */
    private boolean canRunTest() throws BundleException
    {
        Bundle mongoBundle = getMongoDBBundle();
        mongoBundle.start();

        Bundle mongoStoreBundle = getMongoDBStoreBundle();
        mongoStoreBundle.start();

        // Provision an empty configuration...
View Full Code Here


    {
        Bundle mongoBundle = getMongoDBBundle();
        mongoBundle.start();

        Bundle mongoStoreBundle = getMongoDBStoreBundle();
        mongoStoreBundle.start();

        // Provision an empty configuration...
        BundleContext context = mongoStoreBundle.getBundleContext();

        ServiceReference serviceRef = context.getServiceReference(ManagedService.class.getName());
View Full Code Here

            InputStream in = locator.loadDriver( driverId );
            // System.out.println(driverId + ", " + locator + " returned: " +
            // in);
            Bundle driverBundle = m_context.installBundle( DRIVER_LOCATION_PREFIX + driverId, in );

            driverBundle.start();

            ServiceReference[] refs = driverBundle.getRegisteredServices();

            driverRefs.addAll( Arrays.asList( refs ) );
            // keep track of them locally
View Full Code Here

            assertBundle(info, "osgi-installer-testB", "1.0", Bundle.ACTIVE);
            assertBundle(info, "osgi-installer-testbundle", "1.2", Bundle.ACTIVE);
            assertBundle(info, "osgi-installer-snapshot-test", "1.0.0.SNAPSHOT", Bundle.ACTIVE);

            final Bundle b = findBundle("osgi-installer-needsB");
            b.start();
            assertBundle("After reinstalling testB, needsB must be startable, ",
                "osgi-installer-needsB", "1.0", Bundle.ACTIVE);
            assertBundle("testA bundle should still be present", "osgi-installer-testA", "1.0", Bundle.ACTIVE);
        }
    }
View Full Code Here

                    if (isFragmentBundle(bundle)) {
                        log.log(LogService.LOG_INFO, "Skipping fragment bundle '" + symbolicName + "'");
                    }
                    else {
                        try {
                            bundle.start();
                        }
                        catch (Exception be) {
                            log.log(LogService.LOG_WARNING, "Could not start bundle '" + symbolicName + "'", be);
                        }
                    }
View Full Code Here

        }

        for (Iterator i = bundles.iterator(); i.hasNext();) {
            Bundle bundle = (Bundle) i.next();
            try {
                bundle.start();
            }
            catch (Exception be) {
                throw new DeploymentException(CODE_OTHER_ERROR, "Could not start customizer bundle '" + bundle.getSymbolicName() + "'", be);
            }
            addRollback(new StopCustomizerRunnable(session, bundle));
View Full Code Here

        TestCase.assertNotNull( SimpleComponent.INSTANCE );
        TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) );
       
       
        Bundle b2 = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.11", null );
        b2.start();
        checkConfigurationCount(b2, pid, 0, -1);
       
        bundle.stop();
        delay();
       
View Full Code Here

        TestCase.assertNotNull( SimpleComponent.INSTANCE );
        TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) );
       
       
        Bundle b2 = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.11", null );
        b2.start();
        checkConfigurationCount(b2, pid, 0, -1);
       
        bundle.stop();
        delay();
       
View Full Code Here

        TestCase.assertNotNull( SimpleComponent.INSTANCE );
        TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) );
       
       
        Bundle b2 = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.11", null );
        b2.start();
        checkConfigurationCount(b2, pid, 1, ComponentConfigurationDTO.ACTIVE);

    }

}
View Full Code Here

                     && bundle.getState() != Bundle.ACTIVE
                     && bundle.getState() != Bundle.STARTING
                     && bundle.getState() != Bundle.STOPPING
                     && bundle.getState() != Bundle.UNINSTALLED) {
                    try {
                        bundle.start();
                        started++;
                        ctx.log("Started bundle {}", bundle);
                        remove.add(id);
                    } catch (final BundleException e) {
                        getLogger().info("Unable to start bundle {} : {}", bundle, e.getMessage());
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.