Ejemplo n.º 1
0
  @Before
  public void setUp() throws Exception {
    system = LiveOakFactory.create();
    system.extensionInstaller().load("memory", new InMemoryDBExtension());

    awaitStability();
    InternalApplication application =
        system.applicationRegistry().createApplication("testApp", "Test Application");
    application.extend("memory");

    awaitStability();

    InMemoryDBResource resource =
        (InMemoryDBResource) system.service(InMemoryDBExtension.resource("testApp", "memory"));
    resource.addMember(new InMemoryCollectionResource(resource, "data"));
    resource.addMember(new InMemoryCollectionResource(resource, "notifications"));

    this.client = system.client();
  }
Ejemplo n.º 2
0
  @Before
  public void setUp() throws Exception {
    this.system = LiveOakFactory.create();
    this.system.extensionInstaller().load("memory", new InMemoryDBExtension());

    // LIVEOAK-295 ... make sure system services have all started before performing programmatic
    // application deployment
    this.system.awaitStability();
    this.application =
        this.system.applicationRegistry().createApplication("testApp", "Test Application");
    this.application.extend("memory");

    this.system.awaitStability();

    InMemoryDBResource resource =
        (InMemoryDBResource) this.system.service(InMemoryDBExtension.resource("testApp", "memory"));
    resource.addMember(new InMemoryCollectionResource(resource, "data"));
    resource.addMember(new InMemoryCollectionResource(resource, "notifications"));

    this.client = this.system.client();
  }