That is correct. --
Christian Mötzing Consultant Phone: +49 (711) 22040 718 Mobile: +49 (160) 88 06 281 Fax: +49 (711) 22040-899 Email: christian.moetz...@novatec-gmbh.de Web: www.novatec-gmbh.de NovaTec Consulting GmbH Dieselstrasse 18/1 - D-70771 Leinfelden-Echterdingen Sitz der Gesellschaft: Waldenbuch Handelsregister: Stuttgart – HRB 739078 Geschäftsführer: Hans-Dieter Brenner – Michael Schuchart – Albrecht Stäbler > Am 12.08.2014 um 17:33 schrieb Kevin Sutter <kwsut...@gmail.com>: > > Hi Christian, > If I read your post correctly, the enhancement processing itself is working > via the maven plugin. But, the specific openjpa property > (openjpa.DetachState) does not seem to be taking effect. Is that an > accurate summary? Before I comment further, I just want to ensure that I > understand the specific question. Thanks. > > Kevin > > > On Tue, Aug 12, 2014 at 10:18 AM, Christian Mötzing < > christian.moetz...@novatec-gmbh.de> wrote: > >> >> >> Hello OpenJPA mailing list. >> >> >> >> >> I hope I did not double post now. The page >> http://openjpa.apache.org/mailing-lists.html mentions I can post messages >> and does not mention any access restrictions (like being subscribed). >> >> I did not receive any feedback on my first mail (I was not subscribed) and >> it did not show in the feed etc. so I figured I need to subscribe to the >> list. Maybe some words on that on that page would be great. >> >> >> >> >> Now to my actual topic: >> >> >> >> I have the following configuration in my persistence.xml: >> >> >> >> <persistence-unit name="my.pu"> >> >> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> >> >> <class>com.company.project.entities.Entity</class> >> >> <properties> >> >> <property name="openjpa.DetachState" >> value="loaded(DetachedStateField=true)"/> >> >> </properties> >> >> </persistence-unit> >> >> >> >> My project can be built with Eclipse using runtime enhancement afterwards >> (via OpenJPA agent) to execute some tests. In this case enhancement uses >> the option above and does not insert transient fields on enhancement. >> >> I also have a maven build utilizing openjpa-maven-plugin >> (<groupId>org.apache.openjpa</groupId><artifactId>openjpa-maven-plugin</artifactId>). >> >> >> >> Plugin configuration looks like this: >> >> >> >> <executions> >> >> <execution> >> >> <id>enhancer</id> >> >> <phase>process-classes</phase> >> >> <goals> >> >> <goal>enhance</goal> >> >> </goals> >> >> <configuration> >> >> <includes>**/entities /*.class</includes> >> >> <addDefaultConstructor>false</addDefaultConstructor> >> >> <skip>${openjpa.enhance.skip}</skip> >> >> <toolProperties> >> >> <property> >> >> <name>openjpa.DetachState</name> >> >> <value>loaded(DetachedStateField=true)</value> >> >> </property> >> >> </toolProperties> >> >> </configuration> >> >> </execution> >> >> </executions> >> >> >> >> With or without toolProperties-tag entity enhancement does not use the >> option (neither through persistence.xml nor through pom.xml). Can you >> please point me to some documentation on how to set this option with >> openjpa-maven-plugin? >> >> >> >> >> This page >> http://openjpa.apache.org/builds/2.2.1/apache-openjpa/docs/ref_guide_conf_openjpa.html#openjpa.DetachState >> mentions a "Resource adapter config-property" for each entry. But there is >> no hint in the docs on what a " Resource adapter" is in an OpenJPA context >> nor where I can set it. >> >> >> >> >> I am using OpenJPA 2.2.1. >> >> >> >> >> With kind regards >> >> >> Christian Mötzing >> Consultant >> >> NOVA TEC // Consulting GmbH >> Dieselstrasse 18/1 // D-70771 Leinfelden-Echterdingen >> >> >> >> phone: >> >> +49 711 22040-718 >> >> >> fax: >> >> +49 711 22040-899 >> >> >> mobile: >> >> +49 1608806281 >> >> >> e-mail: >> >> christian.moetz...@novatec-gmbh.de >> >> >> web: >> >> www.novatec-gmbh.de >> >> >> >> Sitz der Gesellschaft: Waldenbuch // Handelsregister: Stuttgart – HRB >> 739078 >> Geschäftsführer: Hans-Dieter Brenner // Michael Schuchart // Albrecht >> Stäbler >>