Alexey Makarenko commented on an issue
Hibernate ORM / Bug HHH-8592
Temporary StatelessSession closing affects original session
If StatelessSession was created with SessionFactory.openStatelessSession(Connection) and connection is obtained from already opened Session, attempt to close Original Session at the end of transaction is failing with exception "org.hibernate.HibernateException: proxy handle is no longer valid"