/**
   * Add a default partition to the server
   *
   * @param partitionId The partition Id
   * @param partitionDn The partition DN
   * @return The newly added partition
   * @throws Exception If the partition can't be added
   */
  private void createDefaultPartition() throws Exception {
    Partition partition = new JdbmPartition();
    partition.setId("jboss");
    partition.setSuffix("dc=jboss,dc=org");

    service.addPartition(partition);
  }
  private Partition addPartition(String partitionId, String partitionDn) throws Exception {
    // Create a new partition named 'ippon'.
    Partition partition = new JdbmPartition();
    partition.setId(partitionId);
    partition.setSuffix(partitionDn);
    service.addPartition(partition);

    return partition;
  }