mirror of https://github.com/apache/openjpa.git
OPENJPA-2099: doc for openjpa.jdbc.CachesSelect option
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1241509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e5a7710d6b
commit
647ab63101
|
@ -1351,4 +1351,29 @@ for a JPQL query.
|
|||
</para>
|
||||
|
||||
</section>
|
||||
<section id="ref_guide_cache_select">
|
||||
<title>Select Cache</title>
|
||||
<indexterm zone="ref_guide_cache_select">
|
||||
<primary>caching</primary>
|
||||
<secondary>Select Cache</secondary>
|
||||
</indexterm>
|
||||
<para>
|
||||
OpenJPA generates SQL SELECT statements to fetch database records and populates the persistent entity states
|
||||
from the result data. Under certain assumptions, these select statements are invariant for an entity
|
||||
or its relations except that their binding parameters vary between executions. In version 2.2.0, OpenJPA
|
||||
allows these select statements be reused. Such reuse avoids the cost of regenerating these statements in
|
||||
every execution.
|
||||
</para>
|
||||
<para>
|
||||
This facility can be activated by <programlisting>openjpa.jdbc.CachesSelect</programlisting> configuration
|
||||
property. This property accepts boolean value of <programlisting>true</programlisting> or
|
||||
<programlisting>false</programlisting>. By default, the property value is <programlisting>false</programlisting>.
|
||||
The property value can be changed once and only once.
|
||||
</para>
|
||||
<para>
|
||||
The assumption that a select statement for a persistent entity is invariant holds only if the fetch plan
|
||||
is not dynamically modified. OpenJPA runtime currently makes no attempt to ensure that the assumption
|
||||
is held true i.e. the application is not modifying the fetch plan dynamically.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
|
|
@ -3427,6 +3427,43 @@ levels are equivalent. Lock levels <literal>pessimistic-read</literal>,
|
|||
<para>
|
||||
The following properties apply exclusively to the OpenJPA JDBC back-end.
|
||||
</para>
|
||||
|
||||
<section id="openjpa.jdbc.CachesSelect">
|
||||
<title>
|
||||
openjpa.jdbc.CachesSelect
|
||||
</title>
|
||||
<indexterm zone="openjpa.jdbc.CachesSelect">
|
||||
<primary>
|
||||
Select Cache
|
||||
</primary>
|
||||
</indexterm>
|
||||
<indexterm zone="openjpa.jdbc.CachesSelect">
|
||||
<primary>
|
||||
caching
|
||||
</primary>
|
||||
<secondary>
|
||||
Select Cache
|
||||
</secondary>
|
||||
</indexterm>
|
||||
<para>
|
||||
<emphasis role="bold">Property name:</emphasis>
|
||||
<literal>openjpa.jdbc.CachesSelect</literal>
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">Resource adaptor config-property:</emphasis>
|
||||
<literal>CachesSelect</literal>
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">Default:</emphasis> <literal>false</literal>.
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">Description:</emphasis> A plugin string (see
|
||||
<xref linkend="ref_guide_conf_plugins"/>) describing the options to reuse SQL SELECT
|
||||
statements generated to load persistent entity and its relations.
|
||||
See <xref linkend="ref_guide_cache_select"/> for details.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="openjpa.jdbc.ConnectionDecorators">
|
||||
<title>
|
||||
openjpa.jdbc.ConnectionDecorators
|
||||
|
|
Loading…
Reference in New Issue