directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: what cause InvalidCursonPositionException?
Date Thu, 18 Apr 2013 22:15:33 GMT
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 


Mime
View raw message