HibernateUtil code from http://java-success.blogspot.in/2012/09/understanding-hibernate-proxy-objects.html is much cleaner and probably performs a bit better, because no reflection is used. Could we use that instead?