Skip to main content
Jump to: navigation, search

EclipseLink/UserGuide/JPA/Advanced JPA Development/Performance/Weaving/Static Weaving

EclipseLink JPA

Mailing ListForumsIRCmattermost
OpenHelp WantedBug Day
Browse Source

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:

Configuration Using a Jar File

This is the configuration specified in the JPA 2.0 specification. Requirements are:

  • Classes stored at the base in directories based on their package structure
  • A META-INF directory containing the persistence.xml file. Note: Using the persistenceunitinfo setting below, you can avoid this requirement.

For example, mypersitenceunit.jar could contain

  • mypackage/MyEntity1.class
  • mypackage/MyEntity2.class
  • mypackage2/MyEntity3.class
  • META-INF/persistence.xml
Elug javaspec icon.gif

For more information, see Section 11.1.18 "Persistence Unit Packaging" in the JPA Specification.

Configuration Using an Exploded Directory Structure

Version: 2.2.0 DRAFT
Other versions...

Back to the top