Mock tests, Interview questions, Tutorials and Tech news
 
 
Home > Programming / tutorials > How well does hibernate perform ?

How well does hibernate perform ?

A lot has been said and discussed about hibernate performance.I will not go into details and benchmarks but I will share some practical insights.

Our application was developed using Spring framework 2.5 , spring webflow and hibernate 3.0. We had Oracle application server (not the oracle weblogic ) and oracle database 10g

Caching : Second level caching was done using ehcache. The caching strategy was read-only which is the simplest and best-performing cache strategy

Stored Procedures : Procs were used at couple of places. These procs had business logic and were communicating with another database through DB Link.

Native queries : We did not use any native queries.

We have used Spring and hibernate with one of the biggest deployment in applications and I can tell you, I have not seen any issues or so because of hibernate.

Yes we had to fix the hqls at few places but that is a normal tuning process.

I cannot share much details here neither the performance statistics but will be happy to answer your questions.

Be Sociable, Share!
  1. vaseem
    March 5th, 2012 at 03:30 | #1

    Thankyou for sharing

  2. November 4th, 2011 at 07:55 | #2

    Tanvir
    Use case 1 is handled by version control in hibernate. I will not go into details you will set up a column “version”in table and then define that in your hbm file. You would find a lot of examples on how to do that.
    Second use case is one which I have seen happening so many times.
    Solution a) make sure your your db inserts and updates are done through hibernate.
    Solution b) If the db values are not changed frequently for eg in reference tables, then write a program which forces to refresh your cache. I will add more details on this.

  3. October 12th, 2011 at 21:17 | #3

    I would like to know how does Java community handle this situation using hibernate. I am listing the use case below

    Inventory DB is being used by 3 separate application using Hibernate

    When you save data from 1 application, that data is not available to the other application. If the user is saving the data then they override the updated data.

    use case # 2

    Database needs to be updated by some values by the DBA’s.

    Hibernate application will not reflect the latest data as the objects have stale data in it and will result in totally incorrect. The only way to do is to reset the application of flush the cache or restart application, which to me is really nasty thing to do.

    I have not seen any solution to this problem, and I do not see a reason why hibernate is do popular. It is poorly designed and poorly executed concept, only good for limited site or if used in limitation.

  1. No trackbacks yet.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes