• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Hibernate 4

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 56
4
Mac OS X IntelliJ IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 3
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic