Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

EclipseLink/UserGuide/JPA/Advanced JPA Development/Performance/Weaving/Disabling Weaving with Persistence Unit Properties

< EclipseLink‎ | UserGuide‎ | JPA‎ | Advanced JPA Development‎ | Performance‎ | Weaving
Revision as of 06:53, 17 April 2013 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Warning This page is now obsolete.

For current information, please see "Weaving" in the Java Persistence API (JPA) Extensions Reference for EclipseLink,:

EclipseLink JPA

Mailing ListForumsIRCmattermost
OpenHelp WantedBug Day
Browse Source

Disabling Weaving with Persistence Unit Properties

To disable weaving using EclipseLink persistence unit properties:

  1. Configure your persistence.xml file with one or more of the following properties set to true or false:
    • eclipselink.weaving – This can be used to disables all weaving. This defaults to true if weaving is possible in the environment.
    • eclipselink.weaving.lazy – This can be used to disables weaving for lazy loading (indirection). This defaults to true.
    • eclipselink.weaving.changetracking – This can be used to disables weaving for change tracking. This defaults to true if change tracking is possible for the entity (the entity must have LAZY collection relationships, no mutable basic mappings, and no embeddable element collection mappings).
    • eclipselink.weaving.fetchgroups – This can be used to disables weaving for fetch groups. This defaults to true.
    • eclipselink.weaving.internal – This can be used to disables weaving for internal optimization. This defaults to true.
    • eclipselink.weaving.eager – This can be used to enable weaving for indirection on eager relationships, this allows change tracking on eager collection relationships, and improves cache concurrency for eager object relationships. This defaults to false.

    This example shows how to disable weaving for change tracking only.
    Disabling Weaving for Change Tracking in the persistence.xml File
       <persistence-unit name="HumanResources">
               <property name="eclipselink.weaving.changetracking" value="false"/>

    The following example shows how to disable all weaving: in this example, EclipseLink does not weave for lazy loading (indirection), change tracking, or internal optimization.

    Disabling All Weaving in the persistence.xml File

       <persistence-unit name="HumanResources">
               <property name="eclipselink.weaving" value="false"/>
  2. Package and and deploy your application. .

Version: 2.4 DRAFT
Other versions...

Back to the top