Package org.apache.aries.application.management

Examples of org.apache.aries.application.management.AriesApplicationContext.start()


  /* Install and start the blog eba */
  URL urlToEba = getUrlToEba("org.apache.aries.samples.blog", "org.apache.aries.samples.blog.jpa.eba");
  AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
  AriesApplication app = manager.createApplication(urlToEba);
  AriesApplicationContext ctx = manager.install(app);
  ctx.start();

    /* Find and check all the blog sample bundles */

  Bundle bapi = getInstalledBundle("org.apache.aries.samples.blog.api");
    assertNotNull(bapi);
View Full Code Here


        URL urlToEba = getUrlToEba("org.apache.aries.samples.blog", "org.apache.aries.samples.blog.jdbc.eba");

        AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
        AriesApplication app = manager.createApplication(urlToEba);
        AriesApplicationContext ctx = manager.install(app);
        ctx.start();

    /* Check that the Blog Sample bundles are present an started */
        Bundle bapi = getInstalledBundle("org.apache.aries.samples.blog.api");
        assertNotNull(bapi);
    assertEquals(bapi.ACTIVE, bapi.getState());
View Full Code Here

    assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_REFERENCE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_REFERENCE));
    assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_VALUE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_VALUE));
    assertTrue("Bundle " + BUNDLE_IN_FRAMEWORK + " not found.", bundleSymbolicNames.contains(BUNDLE_IN_FRAMEWORK));
   
    AriesApplicationContext ctx = manager.install(app);
    ctx.start();

    Set<Bundle> bundles = ctx.getApplicationContent();
   
    assertEquals("Number of bundles provisioned in the app", 4, bundles.size());
   
View Full Code Here

    BundleContext newCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);   
   
    assertNull("App is not started yet but HelloWorld service is already there",
        IsolationTestUtils.findHelloWorldService(bundleContext, SAMPLE_APP_NAME));
   
    ctx.start();
   
    assertAppMessage("hello brave new world");
   
    assertTrue("We bounced the app where the update was supposed to do an update in place", oldCtx == newCtx);
  }
View Full Code Here

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
    AriesApplicationContext ctx = manager.install(app);
    app = ctx.getApplication();

    ctx.start();
    assertAppMessage("hello world");   
   
    return app;
  }
 
View Full Code Here

      AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
      AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
      app = manager.resolve(app);
      //installing requires a valid url for the bundle in repository.xml.
      AriesApplicationContext ctx = manager.install(app);
      ctx.start();

      HelloWorld hw = context().getService(HelloWorld.class);
      String result = hw.getMessage();
      assertEquals (result, "hello world");
View Full Code Here

   
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
    AriesApplicationContext ctx = manager.install(app);
   
    ctx.start();
    assertHelloWorldService("test.eba");
   
    manager.uninstall(ctx);
  }
 
View Full Code Here

       
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
    AriesApplicationContext ctx = manager.install(app);
   
    ctx.start();
    assertHelloWorldService("org.apache.aries.sample2");
   
    manager.uninstall(ctx);
  }
 
View Full Code Here

    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
    AriesApplicationContext ctx = manager.install(app);
   
    app = ctx.getApplication();

    ctx.start();

    assertHelloWorldService("org.apache.aries.sample2");

    ctx.stop();
    manager.uninstall(ctx);
View Full Code Here

    manager.uninstall(ctx);
   
    assertNull(IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, "org.apache.aries.sample2"));

    ctx = manager.install(app);
    ctx.start();

    assertHelloWorldService("org.apache.aries.sample2");
   
    manager.uninstall(ctx);
  }
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.