Hello everyone, I need to know about triggers and SPs in ApacheDS in order to implement this features at work. I need them in order to create a trigger in order to synchronize
a table that we have in an Oracle DB. I already created a trigger in the other way (Oracle to ldap) But I need two ways.

After reading all the documentation that I found on internet I still have doubts about this features.

1- It is a posibility to write an interceptor in order to intercept the add call (or DELETE OR MODIFY) and trigger an action in java?
2- In order to add/install our new interceptor:
    a- Build the interceptor and generate a new jar.
    b- Copy the jar file to APACHEDS_INSTALLDIR/lib/ext
    c- ADd the interceptor to the server.xml file in APACHEDS_INSTALLDIR/conf/, fin the xml elements which list the interceptors. The easiest way to add a custom interceptor
    is to add a Spring bean (namespace "s"). You may set configuration properties to the interceptros as well, if it supports some.
    <interceptors>
    <normalizationInterceptor/>
    <s:bean class="org.apache.directory.samples.interceptor.pwdhash.PasswordHashInterceptor">
    <s:property name="hashAlgorithm" value="MD5" />
    </s:bean>
    <authenticationInterceptor/>
    <referralInterceptor/>
    <aciAuthorizationInterceptor/>
    <defaultAuthorizationInterceptor/>
    <exceptionInterceptor/>
    <operationalAttributeInterceptor/>
    ...
    </interceptors>

3- In the documentation (ApacheDS Advanced User Guide v1.5.8-SNAPSHOT) I read information about triggers and store procedures. The information is incomplete, and I didnt
understand well how to implement the triggers.

In one part of the trigger section I found this:

AFTER ADD CALL "Logger.logAddOperation" ($entry,$attributes,$operationPrincipal);

or

AFTER Delete CALL “com.example.ldap.util.sp.BackupTools:backupDeletedEntry” ( $ldapContext “ou=backup,ou=system”, $name, $deletedEntry );

    a- Where I should add the line in order to create the trigger? DO I have to add that line in one attribute? Which one and how?
    b- Do I have to follow same steps like to build an interceptor in order to build the trigger?
    c- Same with SPs?
4- Can you provide me a full detail document about triggeres or SPs (maybe an example or tutorial with the implementation). Perhaps new documentation. I know that there is a new version of APacheDS, but I couldnt find
documentation for this version. In fact the documentation in the Apache page is not complete. So this is why I came to you guys:)

5- While searching I found this two messages in (http://mail-archives.apache.org/mod_mbox/directory-users/201202.mbox/%3CCADwPi+HseKESYBhfJim1crHdsOxOv=PQzJ9eHO8h2VwYcLe33w@mail.gmail.com%3E)
    a- " You also write that stored procedures are currently highly experimental. 
    Does it mean that the code is partly there, but is not used? Are stored 
    procedures not implemented, yet, or is there another api that I can use? 
    Thanks"

    b- "SPs were in fact working a while back but heavy refactoring and changes in
    the server broke the code. Before going forward on this feature we're
    trying to erect a MVCC layer to handle internal local transactions properly
    to maintain consistency and isolation across the changes induced by the
    action of a SP. Furthermore we're redesigning the server to leverage OSGi
    for plugability and this is will obviously impact how SPs are deployed.
    These changes will take some time but it will be operational in a more
    robust, easy to use and dependable wail."

  After reading this I have this doubt "SPs and Triggers are currently working or supported? or is going to be a feature in the next versions? What about ApacheDS 1.57
(this is the version that I am using.)??"

6- Do you know a better way to synchronize LDAP with an Orable DB in ApacheDS?.

7- I know you told me that I should use persistent search to get the notifications, but as my point of view this will be an external solution, am I wrong?

Thanks in advance for your time

On Tue, Apr 17, 2012 at 9:03 AM, Kiran Ayyagari <kayyagari@apache.org> wrote:
use persistent search to get the notifications as and when they happen on
LDAP server. Take a look at Apache LDAP client API [1]

[1] http://directory.apache.org/api
On Tue, Apr 17, 2012 at 5:28 PM, Juan Pablo Sotelo <juan04sm@gmail.com> wrote:
> Hello everybody,  this is the first tIme that I write in this mail list. I
> am new to LDAP servers and I already implemented Apache DS in one of my
> projects, for user authentication. But, right now I am researching about to
> populate the changes in the LDAP server to one table that I have in an
> Oracle DB (bothways). So I want to know if there is a way in order to
> synchronize ApacheDS with Oracle? Could you provide me some documentation
> about this?
>
>
> Thanks in advance.
>
>
> --
> Sotelo Juan Pablo
>



--
Kiran Ayyagari



--
Sotelo Juan Pablo