Package org.apache.aries.application.management

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


    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }

    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("testRequireBundle.eba")));
   
    app = manager.resolve(app);
   
    DeploymentMetadata depMeta = app.getDeploymentMetadata();
   
    List<DeploymentContent> depContents = depMeta.getApplicationDeploymentContents();
View Full Code Here


          System.out.println(c.getName() + " : " + c.getProperties());
        }
      }
    }
   
    AriesApplicationManager manager = getOsgiService(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.
//    ApplicationContext ctx = manager.install(app);
//    ctx.start();

//    HelloWorld hw = getOsgiService(HelloWorld.class);
View Full Code Here

    // Register a BlueprintListener to listen for the events from the BlueprintContainer for the bundle in the appmgrclienttest.eba
   
    AppMgrClientBlueprintListener acbl = new AppMgrClientBlueprintListener();
    ServiceRegistration sr = bundleContext.registerService("org.osgi.service.blueprint.container.BlueprintListener", acbl, null);
   
    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("appmgrclienttest.eba")));
    AriesApplicationContext ctx = manager.install(app);
    ctx.start();
   
    int sleepfor = 3000;
    while ((acbl.success == null || acbl.success == false) && sleepfor > 0) {
      Thread.sleep(100);
      sleepfor-=100;
    }
    assertNotNull("Timed out - didn't receive Blueprint CREATED or FAILURE event", acbl.success);
    assertTrue("Received Blueprint FAILURE event", acbl.success);
   
    ctx.stop();
    manager.uninstall(ctx);
    sr.unregister();
  }
View Full Code Here

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

    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
    app = manager.resolve(app);
  }
View Full Code Here

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

    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.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();
   
    assertEquals(provision.toString(), 3, provision.size());
   
    List<String> bundleSymbolicNames = new ArrayList<String>();
   
    for (DeploymentContent dep : provision) {
      bundleSymbolicNames.add(dep.getContentName());
    }
   
    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());
   
    ctx.stop();
    manager.uninstall(ctx);
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.application.management.AriesApplicationManager

Copyright © 2018 www.massapicom. 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.