Skip to content

Commit 813f76b

Browse files
committed
update docs for StatelessSession to reflect new capabilities
1 parent 59f772f commit 813f76b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

documentation/src/main/asciidoc/introduction/Tuning.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ StatelessSession ss = getSessionFactory().openStatelessSession();
870870

871871
A stateless session:
872872

873-
- doesn't have a first-level cache (persistence context), nor does it interact with any second-level caches, and
873+
- doesn't have a first-level cache (persistence context), and
874874
- doesn't implement transactional write-behind or automatic dirty checking, so all operations are executed immediately when they're explicitly called.
875875

876876
For a stateless session, we're always working with detached objects.

documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ However, it is good practice to close the `ScrollableResults` explicitly.
125125

126126
Thus, a stateless session is a slightly lower-level abstraction that's closer to the underlying JDBC activity:
127127

128-
* there's no first-level cache,
129-
* the stateless session does not interact with any second-level or query cache, and
128+
* there's no first-level cache, and
130129
* there's no transactional write-behind or automatic dirty checking.
131130

132131
Instead, persistence operations occur synchronously when a method of `StatelessSession` is invoked, and entities returned by a stateless session are always detached.
@@ -140,9 +139,8 @@ With a stateless session, there's no need to explicitly manage the size of the f
140139
The `StatelessSession` API comes with certain limitations:
141140

142141
* operations performed using a stateless session never cascade to associated instances,
143-
* collections are ignored by a stateless session,
144142
* lazy loading of associations is not transparent, and is only available via an explicit operation named `fetch()`, and
145-
* operations performed via a stateless session bypass Hibernate's event model and interceptors.
143+
* operations performed via a stateless session bypass Hibernate's event model and action queue.
146144

147145
IMPORTANT: Due to the lack of a first-level cache, stateless sessions are vulnerable to data aliasing effects.
148146

0 commit comments

Comments
 (0)