final File installationDirectory = new File(IConstants.USER_HOME_DIR,
"opends-" + UUID.randomUUID().toString());
Throwable thrown = null;
try {
FileUtils.mkdirs(installationDirectory);
EmbeddedOpenDS openDs = null;
try {
openDs = new EmbeddedOpenDS(installationDirectory, 1024);
openDs.setup();
openDs.configure();
openDs.startup(5000);
InitialLdapContext ctx = null;
try {
ctx = openDs.getInitialContext("cn=Directory Manager",
"password");
} finally {
if (ctx != null) {
ctx.close();
}
}
openDs.shutdown(5000);
} catch (Throwable exc) {
thrown = exc;
} finally {
if (openDs != null) {
openDs.uninstall();
}
}
} finally {
if (installationDirectory.exists()) {
try {