I am using Hibernate 4 in my project, with dbcp connection pooling.
When I changed to c3p0, the performance is improved.
But, I want to check, whether the session is opened and closed properly or not
I need to review the java code with spring(IOC) , hibernate. please suggest me the best starting way to review the code.
I would simply debug through the code.
The source could should be available and can be manually or automatically (e.g. Maven) attached to your project or your IDE might be able to decompile the source code.
Actually Hibernate itself have control on closing the session after your usage is done. To overcome your problem you should not give control to hibernate on session. Using current_session_context_class = managed in hibernate.cfg.xml you can get control over the session instead of hibernate.