Quote:
the reason for that is having finished and comitted a transaction on the session previously,
No, that's not the actual reason.
It's not the transaction state, it's the session state which matters.
LazyInitializationException raises when the session is not open anymore.
Explained in detail:
1. You open a session session1 and read a persistent object obj1 with a lazy OneToMany-relation.
In such case the collection which represents the OneToMany-relation get not filled immediately,
the collection does only keep a reference to session1, in order that he can fill the collection when necessary.
2. In some way you get to a point where you close session1 (probably without intention).
3. Now you access in some way the collection of obj1. The collection now tries to retrieve the associated elements by using session1 but detects that session1 is not open anymore -> LazyInitializationException