private boolean delUser(String userDN) {
try {
ctx.destroySubcontext(userDN);
System.out.println("Delete User successful ");
return true;
} catch (NamingException e) {
System.err.println("Problem changing password: " + e);
} catch (Exception e) {
System.err.println("Problem: " + e);
} finally {
if (ctx != null) {
try {
ctx.close();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return false;
}
try {
ctx.destroySubcontext(userDN);
System.out.println("Delete User successful ");
return true;
} catch (NamingException e) {
System.err.println("Problem changing password: " + e);
} catch (Exception e) {
System.err.println("Problem: " + e);
} finally {
if (ctx != null) {
try {
ctx.close();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return false;
}