Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05E991157A for ; Tue, 23 Sep 2014 08:40:59 +0000 (UTC) Received: (qmail 10433 invoked by uid 500); 23 Sep 2014 08:40:58 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 10390 invoked by uid 500); 23 Sep 2014 08:40:58 -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 10377 invoked by uid 99); 23 Sep 2014 08:40:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 08:40:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [81.209.141.45] (HELO mail-in.novatec-gmbh.de) (81.209.141.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 08:40:31 +0000 Received: from localhost (unknown [127.0.0.1]) by mail-in.novatec-gmbh.de (Postfix) with ESMTP id 770D0F0059 for ; Tue, 23 Sep 2014 08:40:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at localhost Received: from mail-in.novatec-gmbh.de ([127.0.0.1]) by localhost (mail-in.novatec-gmbh.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UeSw7KU2D76G for ; Tue, 23 Sep 2014 10:40:11 +0200 (CEST) Received: from leprlx018.novatec-gmbh.lan (leprlx018.novatec-gmbh.lan [172.16.144.64]) by mail-in.novatec-gmbh.de (Postfix) with ESMTP id 72E9DF0056 for ; Tue, 23 Sep 2014 10:40:11 +0200 (CEST) Received: from localhost (localhost6.localdomain6 [127.0.0.1]) by leprlx018.novatec-gmbh.lan (Postfix) with ESMTP id E21D7217C001; Tue, 23 Sep 2014 10:40:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at novatec-gmbh.de Received: from leprlx018.novatec-gmbh.lan ([127.0.0.1]) by localhost (leprlx018.novatec-gmbh.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MCN4QpiOJQ3n; Tue, 23 Sep 2014 10:40:18 +0200 (CEST) Received: from localhost (localhost6.localdomain6 [127.0.0.1]) by leprlx018.novatec-gmbh.lan (Postfix) with ESMTP id C2437247C013; Tue, 23 Sep 2014 10:40:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at novatec-gmbh.de Received: from leprlx018.novatec-gmbh.lan ([127.0.0.1]) by localhost (leprlx018.novatec-gmbh.lan [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6b8Z0-BK8dQ9; Tue, 23 Sep 2014 10:40:18 +0200 (CEST) Received: from leprlx018.novatec-gmbh.lan (localhost6.localdomain6 [127.0.0.1]) by leprlx018.novatec-gmbh.lan (Postfix) with ESMTP id 9CD84217C001 for ; Tue, 23 Sep 2014 10:40:18 +0200 (CEST) Date: Tue, 23 Sep 2014 10:40:18 +0200 (CEST) From: Christian =?utf-8?Q?M=C3=B6tzing?= To: users@openjpa.apache.org Message-ID: <1140177087.5362987.1411461618410.JavaMail.zimbra@novatec-gmbh.de> In-Reply-To: References: Subject: Re: Options for entity enhancement not working in maven build MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5362986_1464220580.1411461618403" X-Mailer: Zimbra 8.0.4_GA_5737 (ZimbraWebClient - FF32 (Win)/8.0.4_GA_5737) Thread-Topic: Options for entity enhancement not working in maven build Thread-Index: SFgLApC/utZ40BV41WFWbcswrXNnKHQagAAI X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5362986_1464220580.1411461618403 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Out of desperation I tried to use the PCEnhanceTask via antrun in my maven = build.=20 =20 =20 =20 =20 =20 =20 =20 As you can see I use the persistence.xml to provide the entities that need = enhancing. The PU also contains said option ().=20 Still, my entities receive transient fields:=20 protected transient boolean pcVersionInit;=20 protected transient StateManager pcStateManager;=20 private transient Object pcDetachedState;=20 I don't understand why this configuration only works for runtime enhancemen= t, especially if runtime enhancement is strongly discouraged to be used in = production.=20 :-(=20 With kind regards=20 Christian M=C3=B6tzing=20 Consultant=20 NOVA TEC // Consulting GmbH=20 Dieselstrasse 18/1 // D-70771 Leinfelden-Echterdingen=20 phone: =09+49 711 22040-718=20 fax: =09+49 711 22040-899=20 mobile: =09+49 1608806281=20 e-mail: =09christian.moetzing@novatec-gmbh.de=20 web: =09www.novatec-gmbh.de=20 Sitz der Gesellschaft: Waldenbuch // Handelsregister: Stuttgart =E2=80=93 H= RB 739078=20 Gesch=C3=A4ftsf=C3=BChrer: Hans-Dieter Brenner // Michael Schuchart // Albr= echt St=C3=A4bler=20 ----- Original Message ----- From: "Christian M=C3=B6tzing" =20 To: users@openjpa.apache.org=20 Sent: Tuesday, August 12, 2014 8:40:27 AM=20 Subject: Options for entity enhancement not working in maven build=20 Hello OpenJPA mailing list.=20 I have the following configuration in my persistence.xml:=20 =20 org.apache.openjpa.persistence.PersistenceProviderImpl=20 com.company.project.entities.Entity=20 =20 =20 =20 =20 My project can be built with Eclipse using runtime enhancement afterwards= =20 (via OpenJPA agent) to execute some tests. In this case enhancement uses=20 the option above and does not insert transient fields on enhancement.=20 I also have a maven build utilizing openjpa-maven-plugin=20 (org.apache.openjpaopenjpa-maven-plugin).=20 Plugin configuration looks like this:=20 =20 =20 enhancer=20 process-classes=20 =20 enhance=20 =20 =20 **/entities=20 /*.class=20 false=20 ${openjpa.enhance.skip}=20 =20 =20 openjpa.DetachState=20 loaded(DetachedStateField=3Dtrue)=20 =20 =20 =20 =20 =20 With or without toolProperties-tag entity enhancement does not use the=20 option (neither through persistence.xml nor through pom.xml). Can you=20 please point me to some documentation on how to set this option with=20 openjpa-maven-plugin?=20 I am using OpenJPA 2.2.1.=20 With kind regards=20 Christian M=C3=B6tzing=20 Consultant=20 NOVATEC // Consulting GmbH=20 Dieselstrasse 18/1 // D-70771 Leinfelden-Echterdingen=20 phone:=20 +49 711 22040-718=20 fax:=20 +49 711 22040-899=20 mobile:=20 +49 1608806281=20 e-mail:=20 =20 christian.moetzing@novatec-gmbh.de=20 web:=20 www.novatec-gmbh.de=20 Sitz der Gesellschaft: Waldenbuch // Handelsregister: Stuttgart =E2=80=93 H= RB=20 739078=20 Gesch=C3=A4ftsf=C3=BChrer: Hans-Dieter Brenner // Michael Schuchart // Albr= echt=20 St=C3=A4bler=20 ------=_Part_5362986_1464220580.1411461618403--