• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate 4

 
s florence
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Thanks
 
Marcus Biel
Ranch Hand
Posts: 51
IntelliJ IDE Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
babwitnew gasd
Greenhorn
Posts: 3
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

More info you can find at here http://www.17od.com/2006/11/06/using-managed-sessions-in-hibernate-to-ease-unit-testing/

Thanks,
Babu G
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!