Log When Hibernate Acquire & Release a Connection From JDBC Pool

I wanted to share steps on how we can log when Hibernate session actually acquires a DB connection from JDBC connection pool & when it releases it back. I found this article especially useful as we are using session per request scope. Logging this data actually helps us in debugging & releasing db connection in optimum way. That way we can stop holding db connections for a long time & multiple request threads can utilize freed connection from JDBC pool.
I think you would find it helpful. Also let me know if you use other ways of tracking this.