directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pub.cog" <pub....@gmail.com>
Subject Deleting a node and it's children
Date Tue, 02 Feb 2010 13:46:56 GMT
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

Mime
View raw message