You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/03/22 17:26:51 UTC

svn commit: r926160 - in /openjpa/trunk/openjpa-project/src/doc/manual: ref_guide_pc.xml ref_guide_remote.xml

Author: dwoods
Date: Mon Mar 22 16:26:51 2010
New Revision: 926160

URL: http://svn.apache.org/viewvc?rev=926160&view=rev
Log:
OPENJPA-1097 Add some doc details on how the serialization of proxies works and new behavior of using DetachedStateField to ensure proxies are removed when it is set to transient or false.

Modified:
    openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
    openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_remote.xml

Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml?rev=926160&r1=926159&r2=926160&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Mon Mar 22 16:26:51 2010
@@ -1534,6 +1534,61 @@ You can plug your custom proxy manager i
 </programlisting>
                 </example>
             </section>
+            <section id="ref_guide_pc_scos_proxy_serial">
+                <title>
+                    Serialization
+                </title>
+                <indexterm zone="ref_guide_pc_scos_proxy_serial">
+                    <primary>
+                        proxies
+                    </primary>
+                    <secondary>
+                        serialization
+                    </secondary>
+                </indexterm>
+                <indexterm zone="ref_guide_pc_scos_proxy_serial">
+                    <primary>
+                        proxies
+                    </primary>
+                    <secondary>
+                        DetachedStateField
+                    </secondary>
+                </indexterm>
+                <para>
+When objects are serialized, the <literal>DetachedStateField</literal> in
+section <xref linkend="ref_guide_detach_state"/> 
+will be used to help determine when build time proxies will be removed.  
+If runtime created proxies are being used (proxies not supplied by OpenJPA)
+or if an entity has already been detached, then any found proxies will be
+removed during serialization.
+                </para>
+                <itemizedlist>
+                    <listitem>
+                        <para>
+<literal>transient</literal>: Use a transient detached state field. This gives
+the benefits of a detached state field to local objects that are never
+serialized, but retains serialization compatibility for client tiers without
+access to the enhanced versions of your classes or the OpenJPA runtime.
+All proxies will be removed during serialization.  This is the default.
+                        </para>
+                    </listitem>
+                    <listitem>
+                        <para>
+<literal>true</literal>: Use a non-transient detached state field so that
+objects crossing serialization barriers can still be attached efficiently. This
+requires, however, that your client tier have the enhanced versions of your
+classes and the OpenJPA runtime.
+No OpenJPA provided proxies will be removed during serialization.
+                        </para>
+                    </listitem>
+                    <listitem>
+                        <para>
+<literal>false</literal>: Do not use a detached state field.
+All proxies will be removed during serialization.
+                        </para>
+                    </listitem>
+                </itemizedlist>
+            </section>
         </section>
         <section id="ref_guide_pc_extern">
             <title>

Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_remote.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_remote.xml?rev=926160&r1=926159&r2=926160&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_remote.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_remote.xml Mon Mar 22 16:26:51 2010
@@ -290,7 +290,8 @@ to your application. Set this property t
 <literal>transient</literal>: Use a transient detached state field. This gives
 the benefits of a detached state field to local objects that are never
 serialized, but retains serialization compatibility for client tiers without
-access to the enhanced versions of your classes. This is the default.
+access to the enhanced versions of your classes or the OpenJPA runtime.
+This is the default.
                                 </para>
                             </listitem>
                             <listitem>
@@ -298,16 +299,22 @@ access to the enhanced versions of your 
 <literal>true</literal>: Use a non-transient detached state field so that
 objects crossing serialization barriers can still be attached efficiently. This
 requires, however, that your client tier have the enhanced versions of your
-classes and the OpenJPA libraries.
+classes and the OpenJPA runtime.
                                 </para>
                             </listitem>
                             <listitem>
                                 <para>
-<literal>false</literal>: Do not use a detached state field.
+<literal>false</literal>: Do not use a detached state field.  No OpenJPA runtime
+will be required for client tiers.
                                 </para>
                             </listitem>
                         </itemizedlist>
                         <para>
+The detached state field is also used to determine when proxies should be
+removed from entities during serialization.  See the 
+<xref linkend="ref_guide_pc_scos_proxy_serial"/> section for more details.
+                        </para>
+                        <para>
 You can override the setting of this property or declare your own detached state
 field on individual classes using OpenJPA's metadata extensions. See
 <xref linkend="ref_guide_detach_field"/> below.