Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Hibernate & Spring performance problem

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I have application which is using Hibernate 3.2.5 and Spring 2.5 to connect to DB2 9.5 database.
Hibernate configuration is described in my Spring configuration file, so i am using Spring to get Hibernate Session Factory.
All transactions are managed declaratively through Spring AOP API (not through AspectJ annotations, all configuration is in XML file).

My application has a performance problem: beginning a Hibernate transaction takes a lot of time:

As you can see from the log file, just opening JDBC connection to begin Hibernate transaction takes more than two seconds!

Part of my Spring application context is described below:

Does anybody know, is there any way to make Spring & Hibernate to work faster? Maybe i must add something to Spring configuration file?

Thanks in advance!

Best regards, Vasily.

Vasily Kukhta
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everybody, the problem is solved.

If somebody faces the same issue, stop using, because it doesn't support conection pooling. Use C3P0 instead to keep a pool of active JDBC connections, which can be used by Hibernate to begin transactions.

Best regards, Vasily.
Message for you sir! I think it is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic