Examples of EmbeddedDerby2


Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test(expected = IllegalStateException.class)
  public void testCannotConfigureUninstalledDatabase()
      throws ManifestException, IOException, InterruptedException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.configure();
    } finally {
      if (derby != null) {
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test(expected = IllegalStateException.class)
  public void testCannotStartUnconfiguredDatabase() throws ManifestException,
      IOException, InterruptedException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.setup();
      derby.startup(10000);
    } finally {
      if (derby != null) {
        if ( derby.isRunning() ){
          derby.shutdown(10000);
        }
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test
  public void testUninstallNotInstalledDatabase() throws ManifestException,
      IOException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
    } finally {
      if (derby != null) {
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test
  public void testUninstallInstalledDatabase() throws ManifestException,
      IOException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.setup();
    } finally {
      if (derby != null) {
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test
  public void testUninstallConfiguredDatabase() throws ManifestException,
      IOException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.setup();
      derby.configure();
    } finally {
      if (derby != null) {
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test(expected = IllegalStateException.class)
  public void testUninstallRunningDatabase() throws ManifestException,
      IOException, InterruptedException {
    EmbeddedDerby2 derby = null;
    try {
      try {
        derby = new EmbeddedDerby2(new File(new File(
            IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
            NetUtils.findFreePort(10000, 20000), "test0user",
            "test0password");
        derby.setup();
        derby.configure();
        derby.startup(10000);
      } finally {
        if (derby != null) {
          derby.uninstall();
        }
      }
    } finally {
      if (derby != null) {
        derby.shutdown(10000);
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  private final InstallableProduct derby;

  public TestEmbeddedDerby2() throws ManifestException, IOException {
    super();
    derby = new EmbeddedDerby2(new File(IConstants.JAVA_IO_TMPDIR_PATH
        + "/" + UUID.randomUUID().toString()), DATABASE_NAME,
        DATABASE_PORT, "testuser", "testpassword");
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

//  }

  @Test(expected = IllegalStateException.class)
  public void testCannotStartDuplicateDatabase() throws IOException,
      InterruptedException, ManifestException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.setup();
      derby.startup(10000);

      EmbeddedDerby2 derby2 = null;
      try {
        derby2 = new EmbeddedDerby2(new File(new File(
            IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
            NetUtils.findFreePort(10000, 20000), "test0user",
            "test0password");
        derby2.setup();
        derby2.startup(10000);
      } finally {
        if (derby2 != null) {
          if (derby2.isRunning()) {
            derby2.shutdown(10000);
            derby2.uninstall();
          }
        }
      }
    } finally {
      if (derby != null) {
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

  }

  @Test(expected = IllegalStateException.class)
  public void testCannotStartUninstalledDatabase() throws ManifestException,
      IOException, InterruptedException {
    EmbeddedDerby2 derby = null;
    try {
      derby = new EmbeddedDerby2(new File(new File(
          IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
          NetUtils.findFreePort(10000, 20000), "test0user",
          "test0password");
      derby.startup(10000);
    } finally {
      if (derby != null) {
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2

        tomcat.configure();
        tomcat.startup(10000);
        tomcat.shutdown(10000);
        tomcat.uninstall();

        EmbeddedDerby2 derby = new EmbeddedDerby2(installationDir,
            "test", 20000, "test", "test");
        derby.setup();
        derby.configure();
        derby.startup(10000);
        derby.shutdown(10000);
        derby.uninstall();

        EmbeddedActiveMQ activeMQ = new EmbeddedActiveMQ(
            installationDir, 20000);
        activeMQ.setup();
        activeMQ.configure();
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.