Tobias Kremer commented on Bug HHH-4042

The workaround @sandermak posted does not work with Hibernate 4.2.2.

I found an new one:

final StatelessSession statelessSession = sessionFactory.openStatelessSession(connection);

/*
 * DO SOMETHING
 */

 ((TransactionContext) statelessSession).managedFlush(); //HACK to flush the session
 statelessSession.close();

I still do not understand why StatelessSession does not offer a method to flush the session.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira