diff --git a/reference/en/modules/architecture.xml b/reference/en/modules/architecture.xml index ee643cc9bb..b149b07333 100644 --- a/reference/en/modules/architecture.xml +++ b/reference/en/modules/architecture.xml @@ -265,7 +265,7 @@ - + Contextual Sessions 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. + + + org.hibernate.context.ManagedSessionContext - current + sessions are tracked by thread of execution. However, you are responsible to + bind and unbind a Session instance with static methods + on this class, it does never open, flush, or close a Session. + + - 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 session-per-request. 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 Transaction - 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 Transaction 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 for more information and code examples. @@ -337,8 +345,8 @@ but a org.hibernate.transaction.TransactionManagerLookup is configured, Hibernate will use the org.hibernate.context.JTASessionContext. 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". diff --git a/reference/en/modules/configuration.xml b/reference/en/modules/configuration.xml index 41e482db37..c69afc5f6d 100644 --- a/reference/en/modules/configuration.xml +++ b/reference/en/modules/configuration.xml @@ -920,7 +920,7 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]> - +
Miscellaneous Properties @@ -944,7 +944,7 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]> eg. jta | thread | - custom.Class + managed | custom.Class