EclipseLink/UserGuide/JPA/Advanced JPA Development/Performance/Weaving/Static Weaving
|Mailing List • Forums • IRC • mattermost|
|Open • Help Wanted • Bug Day|
Configuring Static Weaving
Use this option to weave all applicable class files at build time so that you can deliver pre-woven class files. Consider this option to weave all applicable class files at build time so that you can deliver prewoven class files. By doing so, you can improve application performance by eliminating the runtime weaving step required by dynamic weaving (see Configuring Dynamic Weaving).
In addition, consider using dynamic weaving to weave in Java environments where you cannot configure an agent.
Prior to weaving, you must configure your persistence unit to be understood by EclipseLink. There are two basic configurations:
- JAR file, as specified in the JPA 2.0 specification.
For more information, see Section 11.1.18 "Persistence Unit Packaging" in the JPA Specification.
- Exploded directory structure
In both cases, the requirements are:
- Classes are stored at the base in directories based on their package structure
- A META-INF directory that contains the persistence.xml file. Note: Using the persistenceunitinfo setting below, you can avoid this requirement.
For example, when using a JAR file, mypersitenceunit.jar could contain the following:
For example, If your base directory was c:/classes, the exploded directory structure would look as follows: