diff --git a/reference/en/modules/transactions.xml b/reference/en/modules/transactions.xml index 801a506782..d186e69ff6 100644 --- a/reference/en/modules/transactions.xml +++ b/reference/en/modules/transactions.xml @@ -512,6 +512,17 @@ Session sess = factory.getCurrentSession(); descriptors of your session bean. The lifecycle of the session is completely managed by Hibernate. + + + There is one caveat to the use of auto_close_session. Due to a limitation + of the JTA spec, it is not possible for Hibernate to automatically clean up any unclosed + ScrollableResults or Iterator instances returned by + scroll() or iterate(). You must + release the underlying database cursor by calling ScrollableResults.close() + or Hibernate.close(Iterator) explicity from a finally + block. (Of course, most applications can easily avoid using scroll() or + iterate() at all from the CMT code.) +