From users-return-1605-apmail-directory-users-archive=directory.apache.org@directory.apache.org Wed Jul 09 13:45:42 2008 Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 22737 invoked from network); 9 Jul 2008 13:45:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 13:45:42 -0000 Received: (qmail 48895 invoked by uid 500); 9 Jul 2008 13:45:42 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 48871 invoked by uid 500); 9 Jul 2008 13:45:42 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 48859 invoked by uid 99); 9 Jul 2008 13:45:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 06:45:42 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.211.150.143] (HELO mailgw.avideurope.com) (64.211.150.143) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 13:44:50 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Transaction for interceptor Date: Wed, 9 Jul 2008 14:45:02 +0100 Message-ID: In-Reply-To: <4874B922.8060102@apache.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Transaction for interceptor Thread-Index: AcjhxXciD9MnHSNVT/a6qr57nyazLgAAaEdw From: "Tanja Ertl" To: , X-Virus-Checked: Checked by ClamAV on apache.org Hi Emmanuel, would a Stored Procedure provide me with such a transactional behaviour? Reading fast over the document I would guess not. Thanks, Tanja -----Original Message----- From: Emmanuel Lecharny [mailto:elecharny@gmail.com] On Behalf Of = Emmanuel Lecharny Sent: Wednesday, July 09, 2008 3:12 PM To: users@directory.apache.org Subject: Re: Transaction for interceptor Tanja Ertl wrote: > Hi, > > with transactional I mean that the origin action and the work done in = the interceptor is an *atomic* piece of work. If one fails, the other = should not be succeeding, too. Like a transaction in database context. > One of our use cases is that our users need to maintain a memberOf = attribute, where all groups of the user are listed. This should be = tracked by an interceptor. If you add a user to a group the interceptor = should update the memberOf attribute of the user entry. This should only = happen, if the original request succeeds. That's no problem, the = interceptor could start the work after the nexus has executed the = request successfully. But vice versa, if the interceptor fails to add = the group to the memberOf attribute, the original request should be = rolled backed, too. > =20 I _think_ that in order to manage memberof and users, a Stored Procedure = + some triggers are a better solution. You won't need to add an=20 interceptor, and it will be able to be run on addition, deletion and=20 modification. You have a good sample here : http://directory.apache.org/community%26resources/ldap-stored-procedures-= and-triggers-in-apacheds.html --=20 -- cordialement, regards, Emmanuel L=E9charny www.iktek.com directory.apache.org