Examples of AriesApplication


Examples of org.apache.aries.application.management.AriesApplication

 
  @Test
  public void testUninstallReinstall() throws Exception {
   
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
    AriesApplicationContext ctx = manager.install(app);
   
    app = ctx.getApplication();

    ctx.start();
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

 
  @Test
  public void testAppWithFragment() throws Exception
  {
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("withFragment.eba")));
    AriesApplicationContext ctx = manager.install(app);

    ctx.start();
   
    assertHelloWorldService("withFragment.eba");
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

  @Test
  public void testAppWithGlobalRepositoryBundle() throws Exception
  {
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
   
    IsolationTestUtils.prepareSampleBundleV2(bundleContext,
        context().getService(RepositoryGenerator.class),
        context().getService(RepositoryAdmin.class),
        context().getService(ModellingManager.class));

    AriesApplication newApp = manager.resolve(app, new ResolveConstraint() {
      @Override
  public String getBundleName() {
        return "org.apache.aries.isolated.sample";
      }
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

            }
        }
    });
     
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
    AriesApplicationContext ctx = manager.install(app);     
   
    try {
        ctx.start();
       
        app = ctx.getApplication();
        assertEquals(1, app.getDeploymentMetadata().getApplicationDeploymentContents().size());
        assertEquals(1, app.getDeploymentMetadata().getApplicationProvisionBundles().size());
        assertTrue(loadedClass.get());
    } finally {
        manager.uninstall(ctx);
    }
  }
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

    }
   
    private Context installApplication(IDirectory application, String applicationName) throws Exception {
        //install the application and start it
        AriesApplicationManager appManager = context().getService(AriesApplicationManager.class);
        AriesApplication app = appManager.createApplication(application);
        AriesApplicationContext appCtx = appManager.install(app);
        appCtx.start();

        return new Context(appCtx, IsolationTestUtils.findIsolatedAppBundleContext(context(), applicationName));
    }
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
   
    app = manager.resolve(app);
   
   
  }
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
    app = manager.resolve(app);
   
    DeploymentMetadata depMeta = app.getDeploymentMetadata();
   
    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
    Collection<DeploymentContent> useBundles = depMeta.getDeployedUseBundle();
    Collection<Content> importPackages = depMeta.getImportPackage();
    assertEquals(provision.toString(), 2, provision.size());
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("hello.eba")));
    AriesApplicationContext ctx = manager.install(app);
    ctx.start();
   
    // Wait 5 seconds just to give the blueprint-managed beans a chance to come up
    try {
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

 
  @Test
  public void testAppWithoutApplicationManifest() throws Exception {
   
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
   
    // application name should be equal to eba name since application.mf is not provided
    assertEquals("test.eba", app.getApplicationMetadata().getApplicationName());
    AriesApplicationContext ctx = manager.install(app);
    ctx.start();
   
    HelloWorld hw = context().getService(HelloWorld.class);
    String result = hw.getMessage();
View Full Code Here

Examples of org.apache.aries.application.management.AriesApplication

  }

  @Test
  public void testAppWithApplicationManifest() throws Exception {
    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
   
    // application name should equal to whatever Application name provided in the application.mf
    assertEquals("test application 2", app.getApplicationMetadata().getApplicationName());
   
    AriesApplicationContext ctx = manager.install(app);
    ctx.start();
   
    HelloWorld hw = context().getService(HelloWorld.class);
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.