directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: Persistent Search
Date Tue, 23 Jul 2013 07:02:58 GMT
On Tue, Jul 23, 2013 at 12:13 PM, Emmanuel Lécharny <elecharny@gmail.com>wrote:

> Le 7/23/13 8:31 AM, Alexander Broekhuis a écrit :
> >> To make this work, we need to let the API codec service about the
> >> corresponding control's factory class
> >> by setting the system property
> >>         System.setProperty(
> StandaloneLdapApiService.DEFAULT_CONTROLS_LIST,
> >>
> >>
> "org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory");
> >>
> > Thanks, I'll try this.
> >
> > But somehow I don't yet fully understand the principles behind the API. I
> > am not familiar with LDAP and/or JNDI, so perhaps I am missing some basic
> > knowledge. Would it make sense to read more about LDAP and JNDI to
> > understand how I should use the API?
>
> Don't read anything about JNDI : this API is pure crap, and diverge from
> LDAP so much that it will make you having headaches...
>
> Reading a few things about LDAP would help though.
>
> OTOH, we should update the site to give more information to users ;-)
> >
> > The problems I am now running into are:
> > I am trying to make a listener like class that tracks a certain DN. So I
> am
> > using a persistent search and for each entry I can call a callback
> method.
> > But I don't know how to tell what the ChangeType of a new entry (updated
> > cursor) is.
>
> With the PersistentSearch, you will be get back any entry that has been
> modified, but you won't know which modification has been done on the
> entry. For that, you have to check the EntryChange control that is
> returned with any SearchResultEntry.
> >
> > What I could find was that I need to use the EntryChange control from the
> > response. To do this I now use setReturnECs on the PersistentSearch
> > control, but I can't find any controls on the Response I get from the
> > Cursor. What am I doing wrong?
>
> We are chekcing if ther eis not a bug in this area...
>
>
> this is again due to not having the proper control factory, replace
earlier property setting with
        System.setProperty( StandaloneLdapApiService.DEFAULT_CONTROLS_LIST,

"org.apache.directory.api.ldap.codec.controls.cascade.CascadeFactory," +

"org.apache.directory.api.ldap.codec.controls.manageDsaIT.ManageDsaITFactory,"
+

"org.apache.directory.api.ldap.codec.controls.search.entryChange.EntryChangeFactory,"
+

"org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsFactory,"
+

"org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory,"
+

"org.apache.directory.api.ldap.codec.controls.search.subentries.SubentriesFactory"
);

then you will be able to see the complete details of the control's value,
otherwise you see only the OID
and below are few more properties if you ever want to use other/extra
controls

        System.setProperty( StandaloneLdapApiService.EXTRA_CONTROLS_LIST,

"org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory,"
+

"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory,"
+

"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory,"
+

"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory,"
+

"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory"
);

        System.setProperty(
StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST,

"org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory,"
+

"org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,"
+

"org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,"
+

"org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,"
+

"org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory"
            );

        System.setProperty(
StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST,

"org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory"
);


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


-- 
Kiran Ayyagari
http://keydap.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message