title: Hibernate: how to get a list of all the objects currently in the session
body: <p>I'm getting the good, old and dreaded <code>TransientObjectException</code>, and, as often happens in such case, I'm having problems locating what kind of subtle bug in the code is causing the problem.</p>
  
  <p>My question is: is there a way to obtain a list of every object that's in the current Hibernate session?</p>
  
  <p>I'll probably have solved the current problem by the time I get an answer for this question, but, anyway, being able to list everything that is the session would help a lot in the next time that happens.</p>