Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Advanced JPA Development/Performance/Weaving/Disabling Weaving with Persistence Unit Properties"

m
(Disabling Weaving with Persistence Unit Properties)
Line 10: Line 10:
 
<ol>
 
<ol>
 
<li>Configure your <tt>persistence.xml</tt> file with one or more of the following properties set to <tt>false</tt><nowiki>:</nowiki>
 
<li>Configure your <tt>persistence.xml</tt> file with one or more of the following properties set to <tt>false</tt><nowiki>:</nowiki>
* <tt>eclipselink.weaving</tt> – disables all weaving;
+
* <tt>eclipselink.weaving</tt> – can be used to disables all weaving;
* <tt>eclipselink.weaving.lazy</tt> – disables weaving for lazy loading (indirection);
+
* <tt>eclipselink.weaving.lazy</tt> – can be used to disables weaving for lazy loading (indirection);
* <tt>eclipselink.weaving.changetracking</tt> –  disables weaving for change tracking;
+
* <tt>eclipselink.weaving.changetracking</tt> –  can be used to disables weaving for change tracking;
* <tt>eclipselink.weaving.fetchgroups</tt> – disables weaving for fetch groups.
+
* <tt>eclipselink.weaving.fetchgroups</tt> – can be used to disables weaving for fetch groups.
* <tt>eclipselink.weaving.internal</tt> – disables weaving for internal optimization.  
+
* <tt>eclipselink.weaving.internal</tt> – can be used to disables weaving for internal optimization.  
* <tt>eclipselink.weaving.eager</tt> – disables weaving for indirection on eager relationships.<br><br>
+
* <tt>eclipselink.weaving.eager</tt> – can be used to enables weaving for indirection on eager relationships, this allows change tracking on eager collection relationships, and improves cache concurrency for eager object relationships.<br><br>
 
This example shows how to disable weaving for change tracking only.
 
This example shows how to disable weaving for change tracking only.
 
<br>
 
<br>

Revision as of 11:46, 24 May 2012

EclipseLink JPA

Eclipselink-logo.gif
EclipseLink
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
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 false:
    • eclipselink.weaving – can be used to disables all weaving;
    • eclipselink.weaving.lazy – can be used to disables weaving for lazy loading (indirection);
    • eclipselink.weaving.changetracking – can be used to disables weaving for change tracking;
    • eclipselink.weaving.fetchgroups – can be used to disables weaving for fetch groups.
    • eclipselink.weaving.internal – can be used to disables weaving for internal optimization.
    • eclipselink.weaving.eager – can be used to enables weaving for indirection on eager relationships, this allows change tracking on eager collection relationships, and improves cache concurrency for eager object relationships.

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

    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>
        <persistence-unit name="HumanResources">
            <class>com.acme.Employee</class>
    
            ...
            <properties>
                <property
                    name="eclipselink.weaving"
                    value="false"
                />
            </properties>
        </persistence-unit>
    </persistence>
    
  2. Package and and deploy your application. .



Eclipselink-logo.gif
Version: 2.2.0 DRAFT
Other versions...

Copyright © Eclipse Foundation, Inc. All Rights Reserved.