Hibernate / EclipseLink Interview questions
What is static weaving in EclipseLink?
Static weaving performs the same bytecode enhancement as dynamic (load-time) weaving, but ahead of time, as a build step, rather than when classes are loaded by the JVM at runtime. EclipseLink provides an Ant task and a Maven plugin that run against already-compiled entity classes and rewrite them with the necessary weaving.
<plugin> <groupId>org.eclipse.persistence</groupId> <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId> </plugin> <plugin> <groupId>org.eclipse.persistence</groupId> <artifactId>eclipselink-maven-plugin</artifactId> <executions> <execution> <goals><goal>weave</goal></goals> </execution> </executions> </plugin>
Static weaving is the right choice in environments where dynamic, load-time weaving isn't available or reliable, such as certain application server configurations, environments without a Java agent enabled, or when packaging an application for deployment platforms that restrict runtime class transformation.
More Related questions...