From: <tu...@us...> - 2006-02-07 20:42:49
|
Update of /cvsroot/hibernate/Hibernate3/doc/reference/en/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv813/doc/reference/en/modules Modified Files: architecture.xml configuration.xml transactions.xml Log Message: Added "managed" option for current_session_context_class Index: architecture.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/doc/reference/en/modules/architecture.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- architecture.xml 7 Oct 2005 13:28:50 -0000 1.9 +++ architecture.xml 7 Feb 2006 20:42:41 -0000 1.10 @@ -265,7 +265,7 @@ </para> </sect1> - <sect1 id="architecture-current-session" revision="1"> + <sect1 id="architecture-current-session" revision="2"> <title>Contextual Sessions</title> <para> Most applications using Hibernate need some form of "contextual" sessions, where a given @@ -316,16 +316,24 @@ sessions are tracked by thread of execution. Again, see the Javadocs for details. </para> </listitem> + <listitem> + <para> + <literal>org.hibernate.context.ManagedSessionContext</literal> - current + sessions are tracked by thread of execution. However, you are responsible to + bind and unbind a <literal>Session</literal> instance with static methods + on this class, it does never open, flush, or close a <literal>Session</literal>. + </para> + </listitem> </itemizedlist> <para> - Both implementations provide a "one session - one database transaction" programming + The first two implementations provide a "one session - one database transaction" programming model, also known and used as <emphasis>session-per-request</emphasis>. The beginning and end of a Hibernate session is defined by the duration of a database transaction. - If you use programatic transaction demarcation (e.g. in pure J2SE or with - JTA/UserTransaction/BMT), you are adviced to use the Hibernate <literal>Transaction</literal> - API to hide the underlying transaction system from your code. If you execute in - an EJB container that supports CMT, transaction boundaries are defined declaratively + If you use programatic transaction demarcation in plain JSE without JTA, you are adviced to + use the Hibernate <literal>Transaction</literal> API to hide the underlying transaction system + from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you + execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you don't need any transaction or session demarcation operations in your code. Refer to <xref linkend="transactions"/> for more information and code examples. </para> @@ -337,8 +345,8 @@ but a <literal>org.hibernate.transaction.TransactionManagerLookup</literal> is configured, Hibernate will use the <literal>org.hibernate.context.JTASessionContext</literal>. Typically, the value of this parameter would just name the implementation class to - use; for the two out-of-the-box implementations, however, there are two corresponding - short names, "jta" and "thread". + use; for the three out-of-the-box implementations, however, there are two corresponding + short names, "jta", "thread", and "managed". </para> </sect1> Index: configuration.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/doc/reference/en/modules/configuration.xml,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- configuration.xml 7 Oct 2005 13:28:50 -0000 1.44 +++ configuration.xml 7 Feb 2006 20:42:41 -0000 1.45 @@ -920,7 +920,7 @@ </tgroup> </table> - <table frame="topbot" id="configuration-misc-properties" revision="9"> + <table frame="topbot" id="configuration-misc-properties" revision="10"> <title>Miscellaneous Properties</title> <tgroup cols="2"> <colspec colname="c1" colwidth="1*"/> @@ -944,7 +944,7 @@ <para> <emphasis role="strong">eg.</emphasis> <literal>jta</literal> | <literal>thread</literal> | - <literal>custom.Class</literal> + <literal>managed</literal> | <literal>custom.Class</literal> </para> </entry> </row> |