Hi,

I'm trying to delete a node of my apacheds using following code:

final CoreSession adminSession = service.getAdminSession();
final LdapDN ldapDnTmp = new LdapDN(dnTmp);
if (adminSession.exists(ldapDnTmp)) {
    adminSession.delete(ldapDnTmp);
}

where service is a DirectoryService object.

The node I want to delete is not empty so I get a LdapContextNotEmptyException.

Is there any existing method that can delete a node and it's children ? Or do I have to iterate and delete them one by one ?

If I have to iterate, do you have some code sample I could use ? (my node only have objectClass=person)...

thanks
--
Benjamin Francisoud

Reply via email to