[hibernate-commits] Hibernate SVN: r16745 - core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Jun 10 14:33:59 EDT 2009


Author: steve.ebersole at jboss.com
Date: 2009-06-10 14:33:59 -0400 (Wed, 10 Jun 2009)
New Revision: 16745

Modified:
   core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml
Log:
added a definition of UoW

Modified: core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml	2009-06-10 18:33:44 UTC (rev 16744)
+++ core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml	2009-06-10 18:33:59 UTC (rev 16745)
@@ -92,6 +92,23 @@
             <title>Unit of work</title>
 
             <para>
+                First, let's define a unit of work.  A unit of work is a
+                design pattern described by Martin Fowler as
+                <quote>
+                    [maintaining] a list of objects affected by a business
+                    transaction and coordinates the writing out of changes
+                    and the resolution of concurrency problems.
+                </quote><citation>PoEAA</citation>
+                In other words, its a series of operations we wish to carry out
+                against the database together.  Basically, it is a transaction,
+                though fulfilling a unit of work will often span multiple
+                physical database transactions (see <xref linkend="transactions-basics-apptx"/>).
+                So really we are talking about a more abstract notion of a
+                transaction.  The term "business transaction" is also sometimes 
+                used in lieu of unit of work.
+            </para>
+
+            <para>
                 Do not use the <emphasis>session-per-operation</emphasis> antipattern:
                 do not open and close a <literal>Session</literal> for every simple database call in
                 a single thread. The same is true for database transactions. Database calls




More information about the hibernate-commits mailing list