Hello Bai, i don't know if it leaves the transaction open or not, i think that it depends.
It depends on the transaction manager that you are using if any, and if the there it's a
transaction timeout associated with it.
I prefer to always starts and commit a transaction to denote a
unit of work. It's a nice
recommendation, 'cause, some of the objects associated with the session can be eligible for GC (if no caching is used).
regards,