Package org.osgi.framework

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


                }
            } );
            assertOrder( value, getConfigurationAdmin().getConfiguration( pid ).getProperties().get( "v" ) );

            cmBundle.stop();
            cmBundle.start();

            assertOrder( value, getConfigurationAdmin().getConfiguration( pid ).getProperties().get( "v" ) );
            getConfigurationAdmin().getConfiguration( pid, null ).delete();

            final List l = Arrays.asList( value );
View Full Code Here


                }
            } );
            assertOrder( value, getConfigurationAdmin().getConfiguration( pid ).getProperties().get( "v" ) );

            cmBundle.stop();
            cmBundle.start();

            assertOrder( value, getConfigurationAdmin().getConfiguration( pid ).getProperties().get( "v" ) );
            getConfigurationAdmin().getConfiguration( pid, null ).delete();
        }
        finally
View Full Code Here

        SimpleComponent sc = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pid, sc.getProperty( TARGETED_PID ) );
       
       
        Bundle bSN = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.11", null );
        bSN.start();
        findComponentConfigurationByName( bSN, pid, ComponentConfigurationDTO.ACTIVE );

       
        SimpleComponent scSN = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSN, scSN.getProperty( TARGETED_PID ) );
View Full Code Here

       
        SimpleComponent scSN = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSN, scSN.getProperty( TARGETED_PID ) );
       
        Bundle bSNV = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.12", null );
        bSNV.start();
        findComponentConfigurationByName( bSNV, pid, ComponentConfigurationDTO.ACTIVE );
        SimpleComponent scSNV = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSNV, scSNV.getProperty( TARGETED_PID ) );
       
        Bundle bSNVL = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.12", "bundleLocation" );
View Full Code Here

        findComponentConfigurationByName( bSNV, pid, ComponentConfigurationDTO.ACTIVE );
        SimpleComponent scSNV = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSNV, scSNV.getProperty( TARGETED_PID ) );
       
        Bundle bSNVL = installBundle( descriptorFile, COMPONENT_PACKAGE, "simplecomponent2", "0.0.12", "bundleLocation" );
        bSNVL.start();
        findComponentConfigurationsByName( bSNVL, pid, ComponentConfigurationDTO.ACTIVE );

        SimpleComponent scSNVL = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSNVL, scSNVL.getProperty( TARGETED_PID ) );
       
View Full Code Here

                        bundle = m_bc.installBundle(id);
                    }

                    if (bundle != null)
                    {
                        bundle.start(options);
                    }
                    else
                    {
                        System.err.println("Bundle ID " + id + " is invalid.");
                    }
View Full Code Here

    /*
     * the bundle is installed but is not started : try to start it before checking version numbers to be sure that any updates are finished
     */
    if (bundle.getState() == Bundle.INSTALLED || bundle.getState() == Bundle.RESOLVED) {
      try {
        bundle.start();
        logger.info("The bundle " + bundle.getSymbolicName() + " is installed and has been started!");
      } catch (BundleException e) {
        logger.info("The bundle " + bundle.getSymbolicName() + " is installed but cannot be started!");
      }

View Full Code Here

      bundle = APAMImpl.context.installBundle(url.toString());
      if (!ApamInstall.getAllComponentNames(bundle).contains(compoName)) {
        logger.error("Bundle " + url.toString() + " does not contain " + compoName + " but contains " + ApamInstall.getAllComponentNames(bundle));
        return false;
      }
      bundle.start();
      return true;
    } catch (BundleException e) {
      logger.error(e.getMessage());
      return false;
    }
View Full Code Here

        Activator hostActivator = new Activator();
        hostActivator.start(bundleContext);
        for (String location : bundleLocations)
        {
            Bundle addition = bundleContext.installBundle(location);
            addition.start();
        }
    }
}
View Full Code Here

        catch (ConnectException e)
        {
            // Ok; expected...
        }

        bundle.start();

        Thread.sleep(500); // Allow Jetty to start (still done asynchronously)...

        assertResponseCode(SC_NOT_FOUND, createURL("/test"));
    }
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.