From: Tucanette <tuc...@go...> - 2010-03-03 09:44:43
|
Hi, currently I am using one trigger to ensure referential integrity beyond xml document boundaries. That trigger is written in Java. Additionally I would like to have the versioning feature of exist-db in my application. I have a few questions: 1. Evgeny is it possible to specify the sequence in which the triggers are fired? 2. When will the branch with the new trigger design be available in the trunk or a release? 3. Using the current release 1.4 of exist, how do I call from one master trigger the code of two other triggers? Which method is being called, to ensure the life cycle of a trigger with calling prepare, configure, finish ...? Simply asked from a master trigger, how do I call the two other java trigger? Regards Simone -----Ursprüngliche Nachricht----- Von: Adam Retter [mailto:ad...@ex...] Gesendet: Dienstag, 2. März 2010 14:46 An: Tucanette Cc: exi...@li...; Evgeny Gazdovsky Betreff: Re: [Exist-open] Multiple Trigger Problem If you look at the code here for the function createTrigger() - https://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist/src/org/exist/collections/CollectionConfiguration.java It would seem to me that you can only register one trigger per-event. You have two triggers that you both want to response to the events "store" and "update". We should change the Triggers code ideally so you can have any number of triggers per event, I think Evgeny may have been attempting this in his triggers branch of the code base. I am not sure of the status of that, how well tested it is or when it will be integrated back into trunk - Evgeny? In the meantime, you could simply create a Trigger in Java that encapsulates those two triggers and passes off the events to them one after another. Cheers Adam. On 28 February 2010 23:02, Tucanette <tuc...@go...> wrote: > Hi, > > > > I would like to have the versioning trigger and also my own trigger to be > fired on the same update event. > > I am running exist db 1.4. > > > > My configuration looks like this: > > <?xml version="1.0" encoding="UTF-8"?> > > <collection xmlns="http://exist-db.org/collection-config/1.0"> > > <triggers> > > <trigger event="store,remove,update" > class="org.exist.versioning.VersioningTrigger"><parameter name="overwrite" > value="yes"/></trigger> > > <trigger event="store,update" > class="de.tucanette.myapp.trigger.ReferentialIntegrityTrigger"/> > > </triggers> > > <validation mode="yes"/> > > </collection> > > > > However, only the second trigger in the configuration list is being > executed. > > Separately configured each of the triggers works fine. > > > > Can someone help me solve the problem? > > > > Regards, > > Simone > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |