From 4a1ab585987ee860ba156f22ab24ed570f182128 Mon Sep 17 00:00:00 2001 From: "Richard G. Curtis" Date: Thu, 20 May 2010 17:54:37 +0000 Subject: [PATCH] OPENJPA-1673: Update docs for MetaDataRepository. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@946726 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/doc/manual/ref_guide_meta.xml | 17 ++++++----------- .../src/doc/manual/ref_guide_optimization.xml | 15 +++++++++++++++ .../src/doc/manual/ref_guide_remote.xml | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/openjpa-project/src/doc/manual/ref_guide_meta.xml b/openjpa-project/src/doc/manual/ref_guide_meta.xml index 2bf65edfd..fc7bc0a48 100644 --- a/openjpa-project/src/doc/manual/ref_guide_meta.xml +++ b/openjpa-project/src/doc/manual/ref_guide_meta.xml @@ -126,23 +126,18 @@ scanned for annotated JPA entities. Preload: A boolean property. If true, OpenJPA will eagerly load the repository on - EntityManagerFactory creation. As a result, all Entity classes will be eagerly loaded by the JVM. If - false, the repository will be lazily loaded as Entity classes are loaded by the JVM. The default value - is false. + EntityManagerFactory creation. As a result, all Entity classes will be eagerly loaded by the JVM. + Once MetaData preloading completes, all locking is removed from the MetaDataRepository and this will + result in a much more scalable repository. If false, the repository will be lazily loaded as Entity + classes are loaded by the JVM. The default value is false. - - - NoLock: If true, the repository will be treated as a read only data structure and - minimal locking will be imposed on users. Preload must be set to true for OpenJPA to honor setting - NoLock to true. The default value is false. - - + Metadata Repository -<property name="openjpa.MetaDataRepository" value="Preload=true,NoLock=true"/> +<property name="openjpa.MetaDataRepository" value="Preload=true"/> diff --git a/openjpa-project/src/doc/manual/ref_guide_optimization.xml b/openjpa-project/src/doc/manual/ref_guide_optimization.xml index f0e068892..4e2b2fae7 100644 --- a/openjpa-project/src/doc/manual/ref_guide_optimization.xml +++ b/openjpa-project/src/doc/manual/ref_guide_optimization.xml @@ -606,6 +606,21 @@ scalability problems. You can disable this protective behavior by setting the linkend="ref_guide_runtime_broker_finalization"/> for details. + + + + Preload MetaDataRepository + + +scalability + + + +By default, the MetaDataRepository is lazily loaded which means that fair amounts of locking +is used to ensure that metadata is processed properly. Enabling preloading allows OpenJPA to +load metadata upfront and remove locking. See for details. + + diff --git a/openjpa-project/src/doc/manual/ref_guide_remote.xml b/openjpa-project/src/doc/manual/ref_guide_remote.xml index a8f4699f3..d6a22fc8e 100644 --- a/openjpa-project/src/doc/manual/ref_guide_remote.xml +++ b/openjpa-project/src/doc/manual/ref_guide_remote.xml @@ -354,7 +354,7 @@ use detached state managers, as determined by the settings above. DetachState setting. Detach all fields and relations as described by the loaded property when an explicit detach is requested or when a single Entity is being detached as part of serialization. When the entire -persistence context is being auto-detached(@See openjpa.AutoDetach), +persistence context is being auto-detached ( openjpa.AutoDetach ), the minimal amount of work will be completed to disassociate all Entities from the persistence context. It is highly recommended that all Entities have a @Version field when using this property. In addition, care needs to be taken