Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 46681 invoked from network); 9 Sep 2009 14:37:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 14:37:21 -0000 Received: (qmail 84043 invoked by uid 500); 9 Sep 2009 14:37:20 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 83982 invoked by uid 500); 9 Sep 2009 14:37:19 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 83972 invoked by uid 99); 9 Sep 2009 14:37:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:37:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ricardo.gladwell@gmail.com designates 209.85.219.222 as permitted sender) Received: from [209.85.219.222] (HELO mail-ew0-f222.google.com) (209.85.219.222) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:37:11 +0000 Received: by ewy22 with SMTP id 22so1034485ewy.14 for ; Wed, 09 Sep 2009 07:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=W0dpWhWzI3V+yeormvka217R8HPdCsLjla5T4AgJle4=; b=RWN8cAI26rUyjeIYvLix4nCGkEFU5DNFmXZALk5/WfKwgrNeCPuMkabam2j3j/0TU7 tiOsXYtY5lBbctc2N1U1SQ6yOEccOcL7KyWPrrePU8//1BzLjRl9tyKGMYNhQVhsaBxI Kuh+9sNANuIoYKOiWjfz1hxXMMM4g6sYukJC8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YGPjIuYdGMwUl0lKJIIYr5TEqGRpImUFrkPhspjWG/WhYWUuh7MqXo2cQWkRMAPxHY 7Ye/Ei56smhFi/BA8qtJiS4c98tgQtez/cOffTQzbTiPXlEnYHAtzbpZL8yqLajQ0+RY JUPTgK+obFigE08gmkTUyngo4VAKkyy1vVhcY= MIME-Version: 1.0 Received: by 10.216.70.143 with SMTP id p15mr58176wed.115.1252507010375; Wed, 09 Sep 2009 07:36:50 -0700 (PDT) Date: Wed, 9 Sep 2009 15:36:49 +0100 Message-ID: <63d6cb2d0909090736r71a7cd97m8841a483ae605851@mail.gmail.com> Subject: Problem with OpenJPA Life-cycle Listeners From: Ricardo Gladwell To: OpenJPA Users Mailing List Content-Type: multipart/alternative; boundary=00504502d1a46e9ef00473260363 X-Virus-Checked: Checked by ClamAV on apache.org --00504502d1a46e9ef00473260363 Content-Type: text/plain; charset=ISO-8859-1 I'm trying to add a PersistListener to my OpenJPA EntityManagerFactory like so: OpenJPAEntityManagerFactorySPI emf = (OpenJPAEntityManagerFactorySPI) OpenJPAPersistence.cast(entityManagerFactory); emf.addLifecycleListener(listener, classes); However, when I then call my DAO to update the my entity like so: entity = dao.readValue(id); entity.setValue("NewValue"); dao.updateValue(entity); My PersistListener is never called. Am I doing something wrong? Using debugging introspection I identified that my PersistListener has been successfully added to the DAO internal JDBCBrokerFactory _lifecycleListeners HashMap. Can anyone advise if I'm doing something wrong? TIA... Ricardo Gladwell --00504502d1a46e9ef00473260363--