weaving
Weaving
Static weaving
Static weaving is the process of enhancing the classes of a persistence unit at build time. This is done by the EclipseLink static weaver. The static weaver is a Java agent that is called by the JVM when the application is started. The static weaver is configured by adding the following JVM arguments:
<build>
<plugins>
<plugin>
<artifactId>eclipselink-staticweave-maven-plugin</artifactId>
<groupId>au.com.alderaan</groupId>
<version>1.0.4</version>
<executions>
<execution>
<goals>
<goal>weave</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<logLevel>FINE</logLevel>
<includeProjectClasspath>true</includeProjectClasspath>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>4.0.2</version>
</dependency>
</dependencies>
</plugin>
Configuration
Dans le fichier persistence.xml, il faut ajouter la propriété suivante :
<property name="eclipselink.weaving" value="static"/>