Yes, I can show that
a) the statement is not closed
and
b) it cannot get closed anymore.
Simply comment out the code after "this fails:" (where I try to do something else in the session).
Then add session.close() after the failed transaction.
You will see in the logs:
INFO: HHH000010: On release of batch it still contained JDBC statements
Sesion.close() fails es well with the exception above:
Exception in thread "main" org.hibernate.HibernateException: proxy handle is no longer valid
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.errorIfInvalid(AbstractProxyHandler.java:63)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:100)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at $Proxy9.clearBatch(Unknown Source)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:163)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:197)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:139)
at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:276)
at org.hibernate.internal.SessionImpl.close(SessionImpl.java:349)
at test.ShowBug.main(ShowBug.java:92)
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
Yes, I can show that
a) the statement is not closed
and
b) it cannot get closed anymore.
Simply comment out the code after "this fails:" (where I try to do something else in the session).
Then add session.close() after the failed transaction.
You will see in the logs:
INFO: HHH000010: On release of batch it still contained JDBC statements
Sesion.close() fails es well with the exception above:
Exception in thread "main" org.hibernate.HibernateException: proxy handle is no longer valid
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.errorIfInvalid(AbstractProxyHandler.java:63)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:100)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at $Proxy9.clearBatch(Unknown Source)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:163)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:197)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:139)
at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:276)
at org.hibernate.internal.SessionImpl.close(SessionImpl.java:349)
at test.ShowBug.main(ShowBug.java:92)