Le 4/18/13 11:08 PM, Wu, James C. a écrit :
> Hi Kiran,
>
> I added this line, but it does not help.
>
>                 searchRequest.setScope(SearchScope.OBJECT);
>
> Basically, I just want to read an entity given its DN, is there an easier way?

If you know the DN, and if you just want to get back the associated
entry, then yes, there is an easier way :

                Dn dn = new Dn(maxUidDN);
                DirectoryService service = getDirectoryService();
                CoreSession session = service.getAdminSession();
                Entry entry = session.lookup(dn);


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to