Thanks for the replies!.. Now everything is clear. Another question: How can I download the code? I saw in the old documentation that you had a svn repository. I tried the old one, and I couldnt get the code ( http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies/apacheds-trunk). Since the latest documentation is not ready in the webpage, How can I get the code? SVN? ZIP?
Where can I get the latest documentation? Thanks again :) On Thu, May 3, 2012 at 1:11 PM, Kiran Ayyagari <[email protected]> wrote: > On Thu, May 3, 2012 at 8:49 PM, Juan Pablo Sotelo <[email protected]> > wrote: > > Hello everybody, > > > > sorry for the insistent question, but I want to > > know if this feature is real (I am talking about triggers), if this > feature > > is currently working on the latest version of apacheDS (I read in a forum > > that is not, need confirmation)?. And if you can, give me some advices > about > > how to syncrhonize the apacheDS with a DB?? > > > > I really want to use ApacheDS on my company but I need to solve this > > "problem". I hope you give me a hand. > > > the only other better way that I can suggest is to write an implementation > of > DirectoryListener [1] and add it to DirectoryService by calling > dirService.getEventService().addListener(). > > This way you get notified of all the event as soon as they happen > matching the provided criteria. > > Another issue after implementing this is to register this listener, > for that you can write a no-op interceptor > and use its init() method to register the listener. > > Another reason I suggest you to use the above said mechanism is > interceptors work in a blocking mode > where as event listeners process each change in a separate thread > > And finally, I would strongly suggest to use the latest milestone > version 2.0.0-M6, it is way better > > HTH > > [1] > http://svn.apache.org/repos/asf/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/DirectoryListener.java > > Thanks > > > > OLD Question - unanswered --------------------------------- > > > > 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=3D"org.apache.directory.samples.interceptor.pwdhash.PasswordHashInter= > > ceptor"> > > <s:property name=3D"hashAlgorithm" value=3D"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 > =93com.example.ldap.util.sp.BackupTools:backupDeletedEntr= > > y=94 > > ( $ldapContext =93ou=3Dbackup,ou=3Dsystem=94, $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/%3CCAD= > > wPi+HseKESYBhfJim1crHdsOxOv=3dpqzj9eho8h2vwycle...@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 > > > > OLD Question - unanswered --------------------------------- > > > > -- > Kiran Ayyagari > -- Sotelo Juan Pablo
