cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r851375 [1/2] - in /websites/staging/cayenne/trunk/content: ./ docs/3.1/cayenne-guide/
Date Thu, 21 Feb 2013 07:07:40 GMT
Author: buildbot
Date: Thu Feb 21 07:07:39 2013
New Revision: 851375

Log:
Staging update by buildbot for cayenne

Modified:
    websites/staging/cayenne/trunk/content/   (props changed)
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/cayenne-guide-part2.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/client-configuration-properties.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/customizing-cayenne-runtime.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/index.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/lifecycle-events.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/performance-tuning.html
    websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/server-configuration-properties.html

Propchange: websites/staging/cayenne/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Feb 21 07:07:39 2013
@@ -1 +1 @@
-1447830
+1448529

Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/cayenne-guide-part2.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/cayenne-guide-part2.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/cayenne-guide-part2.html Thu Feb 21 07:07:39 2013
@@ -1,3 +1,3 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title xmlns:d="http://docbook.org/ns/docbook">Part&nbsp;II.&nbsp;Cayenne Framework</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="cayennemodeler-application.html" title="Chapter&nbsp;3.&nbsp;CayenneModeler Application"><link rel="next" href="including-cayenne-in-project.html" title="Chapter&nbsp;4.&nbsp;Including Cayenne in a Project"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSH
 OT</th><th align="center">Part&nbsp;II.&nbsp;Cayenne Framework</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayennemodeler-application.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="including-cayenne-in-project.html">Next</a></td></tr></table><hr></div><div class="part" title="Part&nbsp;II.&nbsp;Cayenne Framework"><div class="titlepage"><div><div><h1 class="title"><a name="cayenne-guide-part2"></a>Part&nbsp;II.&nbsp;Cayenne Framework</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="including-cayenne-in-project.html">4. Including Cayenne in a Project</a></span></dt><dd><dl><dt><span class="section"><a href="including-cayenne-in-project.html#jar-files-and-depdendencies">Jar Files and Dependencies</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#maven-projects">Maven Projects</a
 ></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#ant-projects">Ant Projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="starting-cayenne.html">5. Starting Cayenne</a></span></dt><dd><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></dd><dt><span class="chapter"><a href="persistent-objects-objectcontext.html">6. Persistent Objects and ObjectContext</a></span></dt><dd><dl><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext">ObjectContext</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-lifecycle">Persistent Object and its Lifecycle</a></span></dt><dt><spa
 n class="section"><a href="persistent-objects-objectcontext.html#persistent-operations">ObjectContext Persistence API</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#cayenne-helper-class">Cayenne Helper Class</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext-nesting">ObjectContext Nesting</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#generic-persistent-objects">Generic Persistent Objects</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#transactions">Transactions</a></span></dt></dl></dd><dt><span class="chapter"><a href="expressions.html">7. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="sect
 ion"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="orderings.html">8. Orderings</a></span></dt><dt><span class="chapter"><a href="queries.html">9. Queries</a></span></dt><dd><dl><dt><span class="section"><a href="queries.html#selectquery">SelectQuery</a></span></dt><dt><span class="section"><a href="queries.html#ejbqlquery">EJBQLQuery</a></span></dt><dt><span class="section"><a href="queries.html#sqltemplate">SQLTemplate</a></span></dt><dt><span class="section"><a href="queries.html#procedurequery">ProcedureQuery</a></span></dt><dt><span class="section"><a href="queries.html#namedquery">NamedQuery</a></span></dt><dt><span cl
 ass="section"><a href="queries.html#custom-queries">Custom Queries</a></span></dt></dl></dd><dt><span class="chapter"><a href="lifecycle-events.html">10. Lifecycle Events</a></span></dt><dd><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#lifecycle-callbacks-listeners">Lifecycle Callbacks and Listeners</a></span></dt></dl></dd><dt><span class="chapter"><a href="performance-tuning.html">11. Performance Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="performance-tuning.html#prefetching">Prefetching</a></span></dt><dt><span class="section"><a href="performance-tuning.html#datarows">Data Rows</a></span></dt><dt><span class="section"><a href="performance-tuning.html#iterated-queries">Iterated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#paginated-queries">Paginated Queries</a></span></dt><dt>
 <span class="section"><a href="performance-tuning.html#caching-and-fresh-data">Caching and Fresh Data</a></span></dt><dt><span class="section"><a href="performance-tuning.html#turning-off-synchronization-of-objectcontexts">Turning off Synchronization of ObjectContexts</a></span></dt></dl></dd><dt><span class="chapter"><a href="customizing-cayenne-runtime.html">12. Customizing Cayenne Runtime</a></span></dt><dd><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accessk
 ey="p" href="cayennemodeler-application.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="including-cayenne-in-project.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;3.&nbsp;CayenneModeler Application&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;4.&nbsp;Including Cayenne in a Project</td></tr></table></div></body></html>
\ No newline at end of file
+   <title xmlns:d="http://docbook.org/ns/docbook">Part&nbsp;II.&nbsp;Cayenne Framework</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="cayennemodeler-application.html" title="Chapter&nbsp;3.&nbsp;CayenneModeler Application"><link rel="next" href="including-cayenne-in-project.html" title="Chapter&nbsp;4.&nbsp;Including Cayenne in a Project"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSH
 OT</th><th align="center">Part&nbsp;II.&nbsp;Cayenne Framework</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayennemodeler-application.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="including-cayenne-in-project.html">Next</a></td></tr></table><hr></div><div class="part" title="Part&nbsp;II.&nbsp;Cayenne Framework"><div class="titlepage"><div><div><h1 class="title"><a name="cayenne-guide-part2"></a>Part&nbsp;II.&nbsp;Cayenne Framework</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="including-cayenne-in-project.html">4. Including Cayenne in a Project</a></span></dt><dd><dl><dt><span class="section"><a href="including-cayenne-in-project.html#jar-files-and-depdendencies">Jar Files and Dependencies</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#maven-projects">Maven Projects</a
 ></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#ant-projects">Ant Projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="starting-cayenne.html">5. Starting Cayenne</a></span></dt><dd><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></dd><dt><span class="chapter"><a href="persistent-objects-objectcontext.html">6. Persistent Objects and ObjectContext</a></span></dt><dd><dl><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext">ObjectContext</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-lifecycle">Persistent Object and its Lifecycle</a></span></dt><dt><spa
 n class="section"><a href="persistent-objects-objectcontext.html#persistent-operations">ObjectContext Persistence API</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#cayenne-helper-class">Cayenne Helper Class</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext-nesting">ObjectContext Nesting</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#generic-persistent-objects">Generic Persistent Objects</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#transactions">Transactions</a></span></dt></dl></dd><dt><span class="chapter"><a href="expressions.html">7. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="sect
 ion"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="orderings.html">8. Orderings</a></span></dt><dt><span class="chapter"><a href="queries.html">9. Queries</a></span></dt><dd><dl><dt><span class="section"><a href="queries.html#selectquery">SelectQuery</a></span></dt><dt><span class="section"><a href="queries.html#ejbqlquery">EJBQLQuery</a></span></dt><dt><span class="section"><a href="queries.html#sqltemplate">SQLTemplate</a></span></dt><dt><span class="section"><a href="queries.html#procedurequery">ProcedureQuery</a></span></dt><dt><span class="section"><a href="queries.html#namedquery">NamedQuery</a></span></dt><dt><span cl
 ass="section"><a href="queries.html#custom-queries">Custom Queries</a></span></dt></dl></dd><dt><span class="chapter"><a href="lifecycle-events.html">10. Lifecycle Events</a></span></dt><dd><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-persistent">Callbacks on Persistent Objects</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-non-persistent">Callbacks on Non-Persistent Listeners</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#comining-listeners-with-datachannelfilters">Combining Listeners with DataChannelFilters</a></span></dt></dl></dd><dt><span class="chapter"><a href="performance-tuning.html">11. Performance Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="performance-tuning.html#prefetching">Prefetching</a></span></dt><dt><span class="section"><a href="
 performance-tuning.html#datarows">Data Rows</a></span></dt><dt><span class="section"><a href="performance-tuning.html#iterated-queries">Iterated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#paginated-queries">Paginated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#caching-and-fresh-data">Caching and Fresh Data</a></span></dt><dt><span class="section"><a href="performance-tuning.html#turning-off-synchronization-of-objectcontexts">Turning off Synchronization of ObjectContexts</a></span></dt></dl></dd><dt><span class="chapter"><a href="customizing-cayenne-runtime.html">12. Customizing Cayenne Runtime</a></span></dt><dd><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><
 span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cayennemodeler-application.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="including-cayenne-in-project.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;3.&nbsp;CayenneModeler Application&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;4.&nbsp;Including Cayenne in a Project</td></tr></table></div></body></html>
\ No newline at end of file

Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/client-configuration-properties.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/client-configuration-properties.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/client-configuration-properties.html Thu Feb 21 07:07:39 2013
@@ -3,7 +3,7 @@
    <title xmlns:d="http://docbook.org/ns/docbook">Appendix&nbsp;B.&nbsp;Service Collections</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="server-configuration-properties.html" title="Appendix&nbsp;A.&nbsp;Configuration Properties"><link rel="next" href="expressions-bnf.html" title="Appendix&nbsp;C.&nbsp;Expressions BNF"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSHOT</th><th align="
 center">Appendix&nbsp;B.&nbsp;Service Collections</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="server-configuration-properties.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="expressions-bnf.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix&nbsp;B.&nbsp;Service Collections"><div class="titlepage"><div><div><h2 class="title"><a name="client-configuration-properties"></a>Appendix&nbsp;B.&nbsp;Service Collections</h2></div></div></div><p>Note that the collection keys below are
                 defined as constants in <code class="code">org.apache.cayenne.configuration.Constants</code>
                 interface.</p><p>
-        </p><table frame="none" id="d0e2513"><caption>Table&nbsp;B.1.&nbsp;Service Collection Keys Present in ServerRuntime and/or ClientRuntime</caption><col width="100%"><tbody><tr>
+        </p><table frame="none" id="d0e2794"><caption>Table&nbsp;B.1.&nbsp;Service Collection Keys Present in ServerRuntime and/or ClientRuntime</caption><col width="100%"><tbody><tr>
                     <td><code class="code">cayenne.properties</code> - Map&lt;String,String&gt; of properties used by built-in
                         Cayenne services. The keys in this map are the property names from the table
                         in Appendix A. Separate copies of this map exist on the server and ROP

Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/customizing-cayenne-runtime.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/customizing-cayenne-runtime.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/customizing-cayenne-runtime.html Thu Feb 21 07:07:39 2013
@@ -147,7 +147,7 @@ ServerRuntime runtime = 
                 services are responsible for it, but setting a specific value of a known property.
                 Supported property names are listed in "Appendix A".</p><p>There are two ways to set service properties. The most obvious one is to pass it
                 to the JVM with -D flag on startup.
-                E.g.</p><pre class="programlisting">java -Dorg.apache.cayenne.sync_contexts=false ...</pre><p>A second one is to contribute a property to
+                E.g.</p><pre class="programlisting">java -Dcayenne.server.contexts_sync_strategy=false ...</pre><p>A second one is to contribute a property to
                     <code class="code">org.apache.cayenne.configuration.DefaultRuntimeProperties.properties
                 </code>map (see the next section on how to do that). This map contains the default
                 property values and can accept application-specific values, overrding the defaults. </p><p>Note that if a property value is a name of a Java class, when this Java class is

Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/index.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/index.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/index.html Thu Feb 21 07:07:39 2013
@@ -8,4 +8,4 @@
                 http://www.apache.org/licenses/LICENSE-2.0</p><p>Unless required by applicable law or agreed to in writing, software distributed
                 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
                 CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
-                language governing permissions and limitations under the License.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="cayenne-guide-part1.html">I. Object Relational Mapping with Cayenne</a></span></dt><dd><dl><dt><span class="chapter"><a href="setup.html">1. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="setup.html#running-cayennemodeler">Running CayenneModeler</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayenne-mapping-structure.html">2. Cayenne Mapping Structure</a></span></dt><dd><dl><dt><span class="section"><a href="cayenne-mapping-structure.html#cayenne-project">Cayenne Project</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datamap">DataMap</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datan
 ode">DataNode</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#dbentity">DbEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#objentity">ObjEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#embeddable">Embeddable</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#procedure">Procedure</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#query">Query</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#listeners-and-callbacks">Listeners and Callbacks</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayennemodeler-application.html">3. CayenneModeler Application</a></span></dt><dd><dl><dt><span class="section"><a href="cayennemodeler-application.html#working-with-mapping-projects">Working with Mapping Projects</a></span></dt><dt><span class="section"><a href="cayennemodeler-appl
 ication.html#reverse-engineering-database">Reverse Engineering Database</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-database-schema">Generating Database Schema</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#migrations">Migrations</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-java-classes">Generating Java Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-inheritance">Modeling Inheritance</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-generic-persistence-classes">Modeling Generic Persistent Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-pk-generation-strategy">Modeling Primary Key Generation Strategy</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="cayenne-guide-part2.html">II. Cayenne Fr
 amework</a></span></dt><dd><dl><dt><span class="chapter"><a href="including-cayenne-in-project.html">4. Including Cayenne in a Project</a></span></dt><dd><dl><dt><span class="section"><a href="including-cayenne-in-project.html#jar-files-and-depdendencies">Jar Files and Dependencies</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#maven-projects">Maven Projects</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#ant-projects">Ant Projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="starting-cayenne.html">5. Starting Cayenne</a></span></dt><dd><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></dd><dt><spa
 n class="chapter"><a href="persistent-objects-objectcontext.html">6. Persistent Objects and ObjectContext</a></span></dt><dd><dl><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext">ObjectContext</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-lifecycle">Persistent Object and its Lifecycle</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-operations">ObjectContext Persistence API</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#cayenne-helper-class">Cayenne Helper Class</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext-nesting">ObjectContext Nesting</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#generic-persistent-objects">Generic Persistent Objects</a></span></dt><dt><span class="section"><a href="persistent-obj
 ects-objectcontext.html#transactions">Transactions</a></span></dt></dl></dd><dt><span class="chapter"><a href="expressions.html">7. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="orderings.html">8. Orderings</a></span></dt><dt><span class="chapter"><a href="queries.html">9. Queries</a></span></dt><dd><dl><dt><span class="section"><a href="queries.html#select
 query">SelectQuery</a></span></dt><dt><span class="section"><a href="queries.html#ejbqlquery">EJBQLQuery</a></span></dt><dt><span class="section"><a href="queries.html#sqltemplate">SQLTemplate</a></span></dt><dt><span class="section"><a href="queries.html#procedurequery">ProcedureQuery</a></span></dt><dt><span class="section"><a href="queries.html#namedquery">NamedQuery</a></span></dt><dt><span class="section"><a href="queries.html#custom-queries">Custom Queries</a></span></dt></dl></dd><dt><span class="chapter"><a href="lifecycle-events.html">10. Lifecycle Events</a></span></dt><dd><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#lifecycle-callbacks-listeners">Lifecycle Callbacks and Listeners</a></span></dt></dl></dd><dt><span class="chapter"><a href="performance-tuning.html">11. Performance Tuning</a></span></dt><dd><dl><dt><span class="
 section"><a href="performance-tuning.html#prefetching">Prefetching</a></span></dt><dt><span class="section"><a href="performance-tuning.html#datarows">Data Rows</a></span></dt><dt><span class="section"><a href="performance-tuning.html#iterated-queries">Iterated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#paginated-queries">Paginated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#caching-and-fresh-data">Caching and Fresh Data</a></span></dt><dt><span class="section"><a href="performance-tuning.html#turning-off-synchronization-of-objectcontexts">Turning off Synchronization of ObjectContexts</a></span></dt></dl></dd><dt><span class="chapter"><a href="customizing-cayenne-runtime.html">12. Customizing Cayenne Runtime</a></span></dt><dd><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section
 "><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="cayenne-guide-part3.html">III. Cayenne Framework - Remote Object Persistence </a></span></dt><dd><dl><dt><span class="chapter"><a href="introduction-to-rop.html">13. Introduction to ROP</a></span></dt><dd><dl><dt><span class="section"><a href="introduction-to-rop.html#what-is-rop">What is ROP</a></span></dt><dt><span class="section"><a href="introduction-to-rop.html#main-features">Main Features</a></span></dt></dl></dd><dt><span class="chapter"><a href="rop-setup.html">14. ROP Setup</a></span></dt><dd><dl><dt><span class="section"><a href="rop-setup.html#rop-system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="rop-setup.html#rop-jar-fil
 es-dependencies">Jar Files and Dependencies</a></span></dt></dl></dd><dt><span class="chapter"><a href="implementing-rop-server.html">15. Implementing ROP Server</a></span></dt><dt><span class="chapter"><a href="implementing-rop-client.html">16. Implementing ROP Client</a></span></dt><dt><span class="chapter"><a href="rop-deployment.html">17. ROP Deployment</a></span></dt><dd><dl><dt><span class="section"><a href="rop-deployment.html#deploying-rop-server">Deploying ROP Server</a></span></dt><dt><span class="section"><a href="rop-deployment.html#deploying-rop-client">Deploying ROP Client</a></span></dt><dt><span class="section"><a href="rop-deployment.html#rop-security">Security</a></span></dt></dl></dd><dt><span class="chapter"><a href="current-limitations.html">18. Current Limitations</a></span></dt></dl></dd><dt><span class="appendix"><a href="server-configuration-properties.html">A. Configuration Properties</a></span></dt><dt><span class="appendix"><a href="client-configu
 ration-properties.html">B. Service Collections</a></span></dt><dt><span class="appendix"><a href="expressions-bnf.html">C. Expressions BNF</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>4.1. <a href="including-cayenne-in-project.html#d0e226">cgen required parameters</a></dt><dt>4.2. <a href="including-cayenne-in-project.html#d0e273">cgen optional parameters</a></dt><dt>4.3. <a href="including-cayenne-in-project.html#d0e474">cdbgen required parameters</a></dt><dt>4.4. <a href="including-cayenne-in-project.html#d0e534">cdbgen optional parameters</a></dt><dt>4.5. <a href="including-cayenne-in-project.html#d0e665">cdbimport required parameters</a></dt><dt>4.6. <a href="including-cayenne-in-project.html#d0e725">cdbimport optional parameters</a></dt><dt>6.1. <a href="persistent-objects-objectcontext.html#d0e1017">Persistence States</a></dt><dt>A.1. <a href="server-configuration-properties.html#d0e2253">Configuration Properties Recognized 
 by ServerRuntime and/or ClientRuntime</a></dt><dt>B.1. <a href="client-configuration-properties.html#d0e2513">Service Collection Keys Present in ServerRuntime and/or ClientRuntime</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="cayenne-guide-part1.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Part&nbsp;I.&nbsp;Object Relational Mapping with Cayenne</td></tr></table></div></body></html>
\ No newline at end of file
+                language governing permissions and limitations under the License.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="cayenne-guide-part1.html">I. Object Relational Mapping with Cayenne</a></span></dt><dd><dl><dt><span class="chapter"><a href="setup.html">1. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="setup.html#running-cayennemodeler">Running CayenneModeler</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayenne-mapping-structure.html">2. Cayenne Mapping Structure</a></span></dt><dd><dl><dt><span class="section"><a href="cayenne-mapping-structure.html#cayenne-project">Cayenne Project</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datamap">DataMap</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datan
 ode">DataNode</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#dbentity">DbEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#objentity">ObjEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#embeddable">Embeddable</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#procedure">Procedure</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#query">Query</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#listeners-and-callbacks">Listeners and Callbacks</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayennemodeler-application.html">3. CayenneModeler Application</a></span></dt><dd><dl><dt><span class="section"><a href="cayennemodeler-application.html#working-with-mapping-projects">Working with Mapping Projects</a></span></dt><dt><span class="section"><a href="cayennemodeler-appl
 ication.html#reverse-engineering-database">Reverse Engineering Database</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-database-schema">Generating Database Schema</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#migrations">Migrations</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-java-classes">Generating Java Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-inheritance">Modeling Inheritance</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-generic-persistence-classes">Modeling Generic Persistent Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-pk-generation-strategy">Modeling Primary Key Generation Strategy</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="cayenne-guide-part2.html">II. Cayenne Fr
 amework</a></span></dt><dd><dl><dt><span class="chapter"><a href="including-cayenne-in-project.html">4. Including Cayenne in a Project</a></span></dt><dd><dl><dt><span class="section"><a href="including-cayenne-in-project.html#jar-files-and-depdendencies">Jar Files and Dependencies</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#maven-projects">Maven Projects</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#ant-projects">Ant Projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="starting-cayenne.html">5. Starting Cayenne</a></span></dt><dd><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></dd><dt><spa
 n class="chapter"><a href="persistent-objects-objectcontext.html">6. Persistent Objects and ObjectContext</a></span></dt><dd><dl><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext">ObjectContext</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-lifecycle">Persistent Object and its Lifecycle</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-operations">ObjectContext Persistence API</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#cayenne-helper-class">Cayenne Helper Class</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext-nesting">ObjectContext Nesting</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#generic-persistent-objects">Generic Persistent Objects</a></span></dt><dt><span class="section"><a href="persistent-obj
 ects-objectcontext.html#transactions">Transactions</a></span></dt></dl></dd><dt><span class="chapter"><a href="expressions.html">7. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="orderings.html">8. Orderings</a></span></dt><dt><span class="chapter"><a href="queries.html">9. Queries</a></span></dt><dd><dl><dt><span class="section"><a href="queries.html#select
 query">SelectQuery</a></span></dt><dt><span class="section"><a href="queries.html#ejbqlquery">EJBQLQuery</a></span></dt><dt><span class="section"><a href="queries.html#sqltemplate">SQLTemplate</a></span></dt><dt><span class="section"><a href="queries.html#procedurequery">ProcedureQuery</a></span></dt><dt><span class="section"><a href="queries.html#namedquery">NamedQuery</a></span></dt><dt><span class="section"><a href="queries.html#custom-queries">Custom Queries</a></span></dt></dl></dd><dt><span class="chapter"><a href="lifecycle-events.html">10. Lifecycle Events</a></span></dt><dd><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-persistent">Callbacks on Persistent Objects</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-non-persistent">Callbacks on Non-Persistent Listeners</a></span></dt><dt><span 
 class="section"><a href="lifecycle-events.html#comining-listeners-with-datachannelfilters">Combining Listeners with DataChannelFilters</a></span></dt></dl></dd><dt><span class="chapter"><a href="performance-tuning.html">11. Performance Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="performance-tuning.html#prefetching">Prefetching</a></span></dt><dt><span class="section"><a href="performance-tuning.html#datarows">Data Rows</a></span></dt><dt><span class="section"><a href="performance-tuning.html#iterated-queries">Iterated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#paginated-queries">Paginated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#caching-and-fresh-data">Caching and Fresh Data</a></span></dt><dt><span class="section"><a href="performance-tuning.html#turning-off-synchronization-of-objectcontexts">Turning off Synchronization of ObjectContexts</a></span></dt></dl></dd><dt><span cl
 ass="chapter"><a href="customizing-cayenne-runtime.html">12. Customizing Cayenne Runtime</a></span></dt><dd><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="cayenne-guide-part3.html">III. Cayenne Framework - Remote Object Persistence </a></span></dt><dd><dl><dt><span class="chapter"><a href="introduction-to-rop.html">13. Introduction to ROP</a></span></dt><dd><dl><dt><span class="section"><a href="introduction-to-rop.html#what-is-rop">What is ROP</a></span></dt><dt><span class="section"><a href="introduction-to-rop.html#main-features">Main Features</
 a></span></dt></dl></dd><dt><span class="chapter"><a href="rop-setup.html">14. ROP Setup</a></span></dt><dd><dl><dt><span class="section"><a href="rop-setup.html#rop-system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="rop-setup.html#rop-jar-files-dependencies">Jar Files and Dependencies</a></span></dt></dl></dd><dt><span class="chapter"><a href="implementing-rop-server.html">15. Implementing ROP Server</a></span></dt><dt><span class="chapter"><a href="implementing-rop-client.html">16. Implementing ROP Client</a></span></dt><dt><span class="chapter"><a href="rop-deployment.html">17. ROP Deployment</a></span></dt><dd><dl><dt><span class="section"><a href="rop-deployment.html#deploying-rop-server">Deploying ROP Server</a></span></dt><dt><span class="section"><a href="rop-deployment.html#deploying-rop-client">Deploying ROP Client</a></span></dt><dt><span class="section"><a href="rop-deployment.html#rop-security">Security</a></span></dt></dl
 ></dd><dt><span class="chapter"><a href="current-limitations.html">18. Current Limitations</a></span></dt></dl></dd><dt><span class="appendix"><a href="server-configuration-properties.html">A. Configuration Properties</a></span></dt><dt><span class="appendix"><a href="client-configuration-properties.html">B. Service Collections</a></span></dt><dt><span class="appendix"><a href="expressions-bnf.html">C. Expressions BNF</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>4.1. <a href="including-cayenne-in-project.html#d0e226">cgen required parameters</a></dt><dt>4.2. <a href="including-cayenne-in-project.html#d0e273">cgen optional parameters</a></dt><dt>4.3. <a href="including-cayenne-in-project.html#d0e474">cdbgen required parameters</a></dt><dt>4.4. <a href="including-cayenne-in-project.html#d0e534">cdbgen optional parameters</a></dt><dt>4.5. <a href="including-cayenne-in-project.html#d0e665">cdbimport required parameters</a></dt><dt>4.6
 . <a href="including-cayenne-in-project.html#d0e725">cdbimport optional parameters</a></dt><dt>6.1. <a href="persistent-objects-objectcontext.html#d0e1017">Persistence States</a></dt><dt>10.1. <a href="lifecycle-events.html#d0e1904">Lifecycle Event Types</a></dt><dt>A.1. <a href="server-configuration-properties.html#d0e2534">Configuration Properties Recognized by ServerRuntime and/or ClientRuntime</a></dt><dt>B.1. <a href="client-configuration-properties.html#d0e2794">Service Collection Keys Present in ServerRuntime and/or ClientRuntime</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="cayenne-guide-part1.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Part&nbsp
 ;I.&nbsp;Object Relational Mapping with Cayenne</td></tr></table></div></body></html>
\ No newline at end of file

Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/lifecycle-events.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/lifecycle-events.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/lifecycle-events.html Thu Feb 21 07:07:39 2013
@@ -1,3 +1,250 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;10.&nbsp;Lifecycle Events</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part&nbsp;II.&nbsp;Cayenne Framework"><link rel="prev" href="queries.html" title="Chapter&nbsp;9.&nbsp;Queries"><link rel="next" href="performance-tuning.html" title="Chapter&nbsp;11.&nbsp;Performance Tuning"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSHOT</th><th align="ce
 nter">Chapter&nbsp;10.&nbsp;Lifecycle Events</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="queries.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Part&nbsp;II.&nbsp;Cayenne Framework</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="performance-tuning.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;10.&nbsp;Lifecycle Events"><div class="titlepage"><div><div><h2 class="title"><a name="lifecycle-events"></a>Chapter&nbsp;10.&nbsp;Lifecycle Events</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#lifecycle-callbacks-listeners">Lifecycle Callbacks and Listeners</a></span></dt></dl></div><div class="section" title="Types of Lifecycle Events"><
 div class="titlepage"><div><div><h2 class="title"><a name="types-of-lifecycle-events"></a>Types of Lifecycle Events</h2></div></div></div></div><div class="section" title="Lifecycle Callbacks and Listeners"><div class="titlepage"><div><div><h2 class="title"><a name="lifecycle-callbacks-listeners"></a>Lifecycle Callbacks and Listeners</h2></div></div></div><div class="section" title="Callback and Listener Methods Semantics"><div class="titlepage"><div><div><h3 class="title"><a name="callback-listener-method-semantics"></a>Callback and Listener Methods Semantics</h3></div></div></div></div><div class="section" title="Registering Callbacks and Listeners"><div class="titlepage"><div><div><h3 class="title"><a name="registering-callbacks-listeners"></a>Registering Callbacks and Listeners</h3></div></div></div></div><div class="section" title="Combining Listeners with DataChannelFilters"><div class="titlepage"><div><div><h3 class="title"><a name="comining-listeners-with-datachannel
 filters"></a>Combining Listeners with DataChannelFilters</h3></div></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="queries.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="performance-tuning.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;9.&nbsp;Queries&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;11.&nbsp;Performance Tuning</td></tr></table></div></body></html>
\ No newline at end of file
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;10.&nbsp;Lifecycle Events</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part&nbsp;II.&nbsp;Cayenne Framework"><link rel="prev" href="queries.html" title="Chapter&nbsp;9.&nbsp;Queries"><link rel="next" href="performance-tuning.html" title="Chapter&nbsp;11.&nbsp;Performance Tuning"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSHOT</th><th align="ce
 nter">Chapter&nbsp;10.&nbsp;Lifecycle Events</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="queries.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Part&nbsp;II.&nbsp;Cayenne Framework</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="performance-tuning.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;10.&nbsp;Lifecycle Events"><div class="titlepage"><div><div><h2 class="title"><a name="lifecycle-events"></a>Chapter&nbsp;10.&nbsp;Lifecycle Events</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecycle Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-persistent">Callbacks on Persistent Objects</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#callback-non-persisten
 t">Callbacks on Non-Persistent Listeners</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#comining-listeners-with-datachannelfilters">Combining Listeners with DataChannelFilters</a></span></dt></dl></div><p>An application might be interested in getting notified when a Persistent object moves
+        through its lifecycle (i.e. fetched from DB, created, modified, committed). E.g. when a new
+        object is created, the application may want to initialize its default properties (this can't
+        be done in constructor, as constructor is also called when an object is fetched from DB).
+        Before save, the application may perform validation and/or set some properties (e.g.
+        "updatedTimestamp"). After save it may want to create an audit record for each saved object,
+        etc., etc. </p><p>All this can be achieved by declaring callback methods either in Persistent objects or in
+        non-persistent listener classes defined by the application (further simply called
+        "listeners"). There are eight types of lifecycle events supported by Cayenne, listed later
+        in this chapter. When any such event occurs (e.g. an object is committed), Cayenne would
+        invoke all appropriate callbacks. Persistent objects would receive their own events, while
+        listeners would receive events from any objects. </p><p>Cayenne allows to build rather powerful and complex "workflows" or "processors" tied to
+        objects lifecycle, especially with listeners, as they have full access to the application
+        evnironment outside Cayenne. This power comes from such features as filtering which entity
+        events are sent to a given listener and the ability to create a common operation context for
+        multiple callback invocations. All of these are discussed later in this chapter.</p><div class="section" title="Types of Lifecycle Events"><div class="titlepage"><div><div><h2 class="title"><a name="types-of-lifecycle-events"></a>Types of Lifecycle Events</h2></div></div></div><p>Cayenne defines the following 8 types of lifecycle events for which callbacks can be
+                regsitered:</p><table frame="void" id="d0e1904"><caption>Table&nbsp;10.1.&nbsp;Lifecycle Event Types</caption><col width="16%"><col width="84%"><thead><tr>
+                        <th>Event</th>
+                        <th>Occurs...</th>
+                    </tr></thead><tbody><tr>
+                        <td>PostAdd</td>
+                        <td>right after a new object is created inside
+                                <code class="code">ObjectContext.newObject()</code>. When this event is fired the
+                            object is already registered with its ObjectContext and has its ObjectId
+                            and ObjectContext properties set.</td>
+                    </tr><tr>
+                        <td>PrePersist</td>
+                        <td>right before a new object is committed, inside
+                                <code class="code">ObjectContext.commitChanges()</code> and
+                                <code class="code">ObjectContext.commitChangesToParent()</code> (and prior to
+                                "<code class="code">validateForInsert()</code>").</td>
+                    </tr><tr>
+                        <td>PreUpdate</td>
+                        <td>right before a modified object is committed, inside
+                                <code class="code">ObjectContext.commitChanges()</code> and
+                                <code class="code">ObjectContext.commitChangesToParent()</code> (and prior to
+                                "<code class="code">validateForUpdate()</code>").</td>
+                    </tr><tr>
+                        <td>PreRemove</td>
+                        <td>right before an object is deleted, inside
+                                <code class="code">ObjectContext.deleteObjects()</code>. The event is also
+                            generated for each object indirectly deleted as a result of CASCADE
+                            delete rule.</td>
+                    </tr><tr>
+                        <td>PostPersist</td>
+                        <td>right after a commit of a new object is done, inside
+                                <code class="code">ObjectContext.commitChanges()</code>.</td>
+                    </tr><tr>
+                        <td>PostUpdate</td>
+                        <td>right after a commit of a modified object is done, inside
+                                <code class="code">ObjectContext.commitChanges()</code>.</td>
+                    </tr><tr>
+                        <td>PostRemove</td>
+                        <td>right after a commit of a deleted object is done, inside
+                                <code class="code">ObjectContext.commitChanges()</code>.</td>
+                    </tr><tr>
+                        <td>PostLoad</td>
+                        <td>
+                            <div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>After an object is fetched inside
+                                            <code class="code">ObjectContext.performQuery()</code>.</p></li><li class="listitem"><p>After an object is reverted inside
+                                            <code class="code">ObjectContext.rollbackChanges()</code>.</p></li><li class="listitem"><p>Anytime a faulted object is resolved (i.e. if a
+                                        relationship is fetched).</p></li></ul></div>
+                        </td>
+                    </tr></tbody></table></div><div class="section" title="Callbacks on Persistent Objects"><div class="titlepage"><div><div><h2 class="title"><a name="callback-persistent"></a>Callbacks on Persistent Objects</h2></div></div></div><p>Callback methods on Persistent classes are mapped in CayenneModeler for each
+            ObjEntity. Empty callback methods are automatically created as a part of class
+            generation (either with Maven, Ant or the Modeler) and are later filled with appropriate
+            logic by the programmer. E.g. assuming we mapped a 'post-add' callback called
+            'onNewOrder' in ObjEntity 'Order', the following code will be
+            generated:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">abstract</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> _Order <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">extends</span> CayenneDataObject {
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">protected</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">abstract</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> onNewOrder();
+}
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Order <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">extends</span> _Order {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Override</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">protected</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> onNewOrder() {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">//TODO: implement onNewOrder</span>
+    }
+}</pre><p>As <code class="code">onNewOrder()</code> is already declared in the mapping, it does not need to
+            be registered explicitly. Implementing the method in subclass to do something meaningful
+            is all that is required at this point. </p><p>As a rule callback methods do not have any knowledge of the outside application, and
+            can only access the state of the object itself and possibly the state of other
+            persistent objects via object's own ObjectContext.</p><p>
+            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p><span class="italic">Validation and callbacks:</span> There is a clear
+                    overlap in functionality between object callbacks and
+                        <code class="code">DataObject.validateForX()</code> methods. In the future validation may
+                    be completely superceeded by callbacks. It is a good idea to use "validateForX"
+                    strictly for validation (or not use it at all). Updating the state before commit
+                    should be done via callbacks.</p></div><p>
+        </p></div><div class="section" title="Callbacks on Non-Persistent Listeners"><div class="titlepage"><div><div><h2 class="title"><a name="callback-non-persistent"></a>Callbacks on Non-Persistent Listeners</h2></div></div></div><p>
+                </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>While listener callback methods can be declared in the Modeler (at least
+                        as of this wrting), which ensures their automatic registration in runtime,
+                        there's a big downside to it. The power of the listeners lies in their
+                        complete separation from the XML mapping. The mapping once created, can be
+                        reused in different contexts each having a different set of listeners.
+                        Placing a Java class of the listener in the XML mapping, and relying on
+                        Cayenne to instantiate the listeners severly limits mapping reusability.
+                        Further down in this chapter we'll assume that the listener classes are
+                        never present in the DataMap and are registered via API.</p></div><p>
+            </p><p>A listener is simply some application class that has one or more annotated
+            callback methods. A callback method signature should be <code class="code">void
+                someMethod(SomePersistentType object)</code>. It can be public, private, protected
+            or use default access:</p><p>
+                </p><pre class="programlisting"> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> OrderListener { 
+  
+   <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostAdd(Order.class)</span>
+   <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> setDefaultsForNewOrder(Order o) {
+      o.setCreatedOn(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> Date());
+   }
+}</pre><p>
+            </p><p>Notice that the example above contains an annotation on the callback method that
+            defines the type of the event this method should be called for. Before we go into
+            annotation details, we'll show how to create and register a listener with Cayenne. It is
+            always a user responsibility to register desired application listeners, usually right
+            after ServerRuntime is started. Here is an example:</p><p>First let's define 2 simple
+            listeners.</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Listener1 {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostAdd(MyEntity.class)</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postAdd(Persistent object) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// do something</span>
+    }
+}
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Listener2 {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostRemove({ MyEntity1.class, MyEntity2.class })</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postRemove(Persistent object) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// do something</span>
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostUpdate({ MyEntity1.class, MyEntity2.class })</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postUpdate(Persistent object) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// do something</span>
+    }
+}</pre><p>Ignore the annotations for a minute. The important point here is that the listeners
+            are arbitrary classes unmapped and unknown to Cayenne, that contain some callback
+            methods. Now let's register them with
+            runtime:</p><pre class="programlisting">ServerRuntime runtime = ...
+
+LifecycleCallbackRegistry registry = 
+    runtime.getDataDomain().getEntityResolver().getCallbackRegistry();
+
+registry.addListener(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> Listener1());
+registry.addListener(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> Listener2());</pre><p>Listeners in this example are very simple. However they don't have to be. Unlike
+            Persistent objects, normally listeners initialization is managed by the application
+            code, not Cayenne, so listeners may have knowledge of various application services,
+            operation transactional context, etc. Besides a single listener can apply to multiple
+            entities. As a consequence their callbacks can do more than just access a single
+            ObjectContext. </p><p>Now let's discuss the annotations. There are eight annotations exactly matching the
+            names of eight lifecycle events. A callback method in a listener should be annotated
+            with at least one, but possibly with more than one of them. Annotation itself defines
+            what event the callback should react to. Annotation parameters are essentially an entity
+            filter, defining a subset of ObjEntities whose events we are interested
+            in:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// this callback will be invoked on PostRemove event of any object </span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// belonging to MyEntity1, MyEntity2 or their subclasses</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostRemove({ MyEntity1.class, MyEntity2.class })</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postRemove(Persistent object) {
+    ...
+}</pre><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// similar example with multipe annotations on a single method</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// each matching just one entity</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostPersist(MyEntity1.class)</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostRemove(MyEntity1.class)</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostUpdate(MyEntity1.class)</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postCommit(MyEntity1 object) {
+    ...
+}</pre><p>As shown above, "value" (the implicit annotation parameter) can contain one or more
+            entity classes. Only these entities' events will result in callback invocation. There's
+            also another way to match entities - via custom annotations. This allows to match any
+            number of entities without even knowing what they are. Here is an example. We'll first
+            define a custom
+            annotation:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Target(ElementType.TYPE)</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Retention(RetentionPolicy.RUNTIME)</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@interface</span> Tag {
+
+}</pre><p>Now we can define a listener that will react to events from ObjEntities annotated with
+            this
+            annotation:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Listener3 {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostAdd(entityAnnotations = Tag.class)</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> postAdd(Persistent object) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// do something</span>
+    }
+}</pre><p>As you see we don't have any entities yet, still we can define a listener that does
+            something useful. Now let's annotate some
+            entities:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Tag</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> MyEntity1 <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">extends</span> _MyEntity1 {
+
+}
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Tag</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> MyEntity2 <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">extends</span> _MyEntity2 {
+
+}</pre></div><div class="section" title="Combining Listeners with DataChannelFilters"><div class="titlepage"><div><div><h2 class="title"><a name="comining-listeners-with-datachannelfilters"></a>Combining Listeners with DataChannelFilters</h2></div></div></div><p>A final touch in the listeners design is preserving the state of the listener within a
+            single select or commit, so that events generated by multiple objects can be collected
+            and processed all together. To do that you will need to implements a
+                <code class="code">DataChannelFilter</code>, and add some callback methods to it. They will store
+            their state in a ThreadLocal variable of the filter. Here is an example filter that does
+            something pretty meaningless - counts how many total objects were committed. However it
+            demonstrates the important pattern of aggregating multiple events and presenting a
+            combined
+            result:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> CommittedObjectCounter <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">implements</span> DataChannelFilter {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> ThreadLocal&lt;<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span>[]&gt; counter;
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Override</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> init(DataChannel channel) {
+        counter = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ThreadLocal&lt;<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span>[]&gt;();
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Override</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> QueryResponse onQuery(ObjectContext originatingContext, Query query, DataChannelFilterChain filterChain) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">return</span> filterChain.onQuery(originatingContext, query);
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@Override</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> GraphDiff onSync(ObjectContext originatingContext, GraphDiff changes, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span> syncType,
+            DataChannelFilterChain filterChain) {
+        
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// init the counter for the current commit</span>
+        counter.set(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span>[<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">1</span>]);
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">try</span> {
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">return</span> filterChain.onSync(originatingContext, changes, syncType);
+        } <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">finally</span> {
+
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// process aggregated result and release the counter</span>
+            System.out.println(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Committed "</span> + counter.get()[<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>] + <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">" object(s)"</span>);
+            counter.set(null);
+        }
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostPersist(entityAnnotations = Tag.class)</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostUpdate(entityAnnotations = Tag.class)</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-annotation">@PostRemove(entityAnnotations = Tag.class)</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> afterCommit() {
+        counter.get()[<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>]++;
+    }
+}</pre><p>Now since this is both a filter and a listener, it needs to be registered as
+            such:</p><pre class="programlisting">CommittedObjectCounter counter = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> CommittedObjectCounter();
+
+ServerRuntime runtime = ...
+DataDomain domain = runtime.getDataDomain();
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// register filter</span>
+domain.addFilter(counter);
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// register listener</span>
+domain.getEntityResolver().getCallbackRegistry().addListener(counter);</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="queries.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="performance-tuning.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;9.&nbsp;Queries&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;11.&nbsp;Performance Tuning</td></tr></table></div></body></html>
\ No newline at end of file



Mime
View raw message