DavidGriffiths wrote:
[
I don't think that's a very good idea.
Sessions are supposed to be short-lived (a unit of work), and transactions exist only within sessions, which means that they shouldn't be long. Perhaps I should try closing and re-opening my session for each iteration.
Just to follow up....
Closing and re-opening the session for each iteration solved the problem.
Turning on debugging didn't provide any insight as to why the data stopped being committed after an hour or so.
I am not sure where the bug is, but there is definately a bug if the transaction returns ok from a "commit" yet the data is not committed.
At the very least an exception should be thrown.