Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 92424 invoked from network); 17 Aug 2007 09:53:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Aug 2007 09:53:05 -0000 Received: (qmail 93681 invoked by uid 500); 17 Aug 2007 09:53:02 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 93314 invoked by uid 500); 17 Aug 2007 09:53:01 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 93305 invoked by uid 99); 17 Aug 2007 09:53:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2007 02:53:01 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bdelacretaz@gmail.com designates 209.85.146.177 as permitted sender) Received: from [209.85.146.177] (HELO wa-out-1112.google.com) (209.85.146.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2007 09:52:59 +0000 Received: by wa-out-1112.google.com with SMTP id m38so191597waf for ; Fri, 17 Aug 2007 02:52:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=PNMP8TyGZaECY8Jm3/6MbTV9ONT4jDiUbL/6WgDijIQpl4KlVFDAA3D1tTY28g6A4KONlFXFnAQtbwA1Od1W1aAnBgDnC5HfBkUC65s7XOdTQrpj2yfX1gOIzG9841+npmWzkjNfNjK6Pj4C8qywa5d7YmLEpfYvWdlRKZB2DXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=S7+L3LS4mwFToK2HH51CEe4Y2WKQfvIufltjMlrXD8bsSCj/u1w4t4KmGX/MkUTVvHSaWKlc9kVWTNTzrr2hfUm5XQPXtixl2IPw16pT6f6CuhR3tGinbFq8gY94ehMJQD7f3VzKKumEmv29pYNVrTPDXOa00sdSXKYDohOgTQI= Received: by 10.114.14.1 with SMTP id 1mr2973269wan.1187344358972; Fri, 17 Aug 2007 02:52:38 -0700 (PDT) Received: by 10.114.196.8 with HTTP; Fri, 17 Aug 2007 02:52:38 -0700 (PDT) Message-ID: Date: Fri, 17 Aug 2007 11:52:38 +0200 From: "Bertrand Delacretaz" Sender: bdelacretaz@gmail.com To: jsr-283-comments@jcp.org Subject: JSR 283: EventCargo API suggestion Cc: dev@jackrabbit.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: ec6753e1a722ca52 X-Virus-Checked: Checked by ClamAV on apache.org Hi, (ccing dev@jackrabbit.apache.org as we have discussed this there, see [1]) I recently implemented a JCR-based audit trail module, and making application-level sense of the Events that an EventListener receives required quite some efforts. In a real-life app with both human users and automated processes generating JCR data, an EventListener is bombarded with Events that sometimes make little sense at the application level, and sorting them out to create a meaningful audit trail can be tricky. I think the following additions to the JCR API would make this much easier: 1) A new Session.setEventCargo(EventCargo) method, causes the supplied EventCargo to be used for all Events generated by this Session from now on. 2) A new Event.getCargo() method, returns the EventCargo that was set in the Session when this Event was generated, or null if none set. 3) The EventCargo class provides set/getUserData() methods to attach any Serializable to it. Serializable is required to be able to store the EventCargo to a transaction/clustering journal, and the EventCargo implementation must be Serializable as well. The idea is to use setEventCargo to indicate what is currently happening at the application level (user is editing data, automatic process is generating additional nodes, etc) to make it easier to analyze the generated Events. Thanks for considering this suggestion - apart from my personal experiences, we've had a several related user requests on the Jackrabbit mailing lists, where this would help a lot. -- Bertrand Delacretaz -- bdelacretaz@apache.org -- http://www.codeconsult.ch [1] http://preview.tinyurl.com/35rrg8