Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D36A1094B for ; Sun, 9 Mar 2014 18:14:34 +0000 (UTC) Received: (qmail 81182 invoked by uid 500); 9 Mar 2014 18:14:34 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 80909 invoked by uid 500); 9 Mar 2014 18:14:31 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 80896 invoked by uid 99); 9 Mar 2014 18:14:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Mar 2014 18:14:30 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 09 Mar 2014 18:14:26 +0000 Received: (qmail 32688 invoked from network); 9 Mar 2014 18:26:11 -0000 Received: from unknown (HELO ?192.168.2.100?) (212.98.191.4) by vorsha.objectstyle.org with SMTP; 9 Mar 2014 18:26:11 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: AuditableFilter constructor From: Andrus Adamchik In-Reply-To: Date: Sun, 9 Mar 2014 21:14:03 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <4688C906-196C-4032-AC6E-479E210A29D8@objectstyle.org> References: To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1874) X-Virus-Checked: Checked by ClamAV on apache.org Done. On Mar 9, 2014, at 8:59 PM, Andrus Adamchik = wrote: > Hi Mark, >=20 > You are absolutely right. EntityResolver should be initialized inside = =91init=92. IIRC the constructor preceded the full definition of the = DataChannelFilter API, so this was overlooked. And in my own code I add = filters when I already have a hold of CayenneRuntime (e.g. [1]), so this = didn=92t come up.=20 >=20 > Let me actually make this change on trunk for 3.2. >=20 > Andrus >=20 >=20 > [1] = https://github.com/andrus/wowodc13/blob/master/editor/src/main/java/demo/e= ditor/services/cayenne/EditorCayenneService.java >=20 >=20 > On Mar 7, 2014, at 12:52 PM, Mark Stobbe = wrote: >=20 >> Hi all, >>=20 >> The AuditableFilter constructor required an entityResolver to be = passed. >> However, when I am initializing the module there is no way to grab = this >> entityResolver just yet. >>=20 >> After careful inspection I noticed that it is not needed during >> construction, but only later. Could anyone tell me why the = entityResolver >> is not set in the init(DataChannel) method of the AuditableFilter, = such >> that you can actually use: >>=20 >> binder.bindList(Constants.SERVER_DOMAIN_FILTERS_LIST) // >> .add(new ChangeSetFilter()) // >> .add(new AuditableFilter(new MyAuditableProcessor())); >>=20 >> in the module.configure(Binder) method. >>=20 >> Mark >=20 >=20