openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Mötzing <christian.moetz...@novatec-gmbh.de>
Subject Options for entity enhancement not working in maven build
Date Tue, 12 Aug 2014 15:18:19 GMT


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.moetzing@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 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message