From hibernate-commits at lists.jboss.org Wed Jun 10 14:44:26 2009 Content-Type: multipart/mixed; boundary="===============0475908539977276431==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r16744 - core/trunk/documentation/manual/src/main/docbook/en-US/content. Date: Wed, 10 Jun 2009 14:33:44 -0400 Message-ID: --===============0475908539977276431== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2009-06-10 14:33:44 -0400 (Wed, 10 Jun 2009) New Revision: 16744 Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/transacti= ons.xml Log: added a definition of UoW Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/tr= ansactions.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/transact= ions.xml 2009-06-10 18:21:29 UTC (rev 16743) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/transact= ions.xml 2009-06-10 18:33:44 UTC (rev 16744) @@ -92,6 +92,23 @@ Unit of work = + First, let's define a unit of work. A unit of work is a + design pattern described by Martin Fowler as + + [maintaining] a list of objects affected by a business + transaction and coordinates the writing out of changes + and the resolution of concurrency problems. + PoEAA + In other words, its a series of operations we wish to carr= y out + against the database together. Basically, it is a transac= tion, + though fulfilling a unit of work will often span multiple + physical database transactions (see ). + So really we are talking about a more abstract notion of a + transaction. The term "business transaction" is also some= times + used in lieu of unit of work. + + + Do not use the session-per-operation = antipattern: do not open and close a Session for eve= ry simple database call in a single thread. The same is true for database transaction= s. Database calls --===============0475908539977276431==--