Appropriate second level cache provider for hibernate 2.1.3

Discussions

General J2EE: Appropriate second level cache provider for hibernate 2.1.3

  1. Hi,

    We have a application deployed on JBoss-3.2.3 with Hibernate-2.1.3 deployed as a MBean. We have enabled second-level cache on the hibernate objects and are using JBossCache1.2 for the same. The cache-usage is "transactional". Currently, we are facing a lot of issues in case of multi user scenarios related to JBossCache(pessimistic locking issues).

    Our current requirements force us to stick to Hibernate2.1.3. JBossCache seems to work fine in a single user scenario, but when it comes to multiple user access(which is the case when the application goes into production) we are encountering a lot of issues, mainly related to cache locking

    Also, the application works fine in case of multiple users on disabling the second level cache(obviously, the application gets slower, though). So there does not seem to a problem per se with the app or the way Hibernate is used in the app. Only when we enable the second level cache we start facing these issues. Disabling the second level cache also does not seem to be a option for us currently, as per the desired performance requirements for the app.

    The response we got on JBoss forums is that it is fixed in Hibernate 3.x with JBossCache 1.3/1.4; the release timelines for which are currently not suitable for the release of our app.

    Can anyone suggest any other cache provider(that can be used as "transactional") that can be used with Hibernate 2.1.3 for a multi-user production environment? It would be helpful if you can provide us with your experiences with caching software (free or paid) in this kind of a scenario.

    Any input on whether tangosol's coherence works in this situation would also be most useful. (I am hoping cameron reads this)

    Thanks.
  2. Can anyone suggest any other cache provider(that can be used as "transactional") that can be used with Hibernate 2.1.3 for a multi-user production environment? [..] Any input on whether tangosol's coherence works in this situation would also be most useful. (I am hoping cameron reads this)

    I know that Coherence can be used with Hibernate, and that it supports the "transactional" strategy. Regarding version support, I'd have to check with Jon (Tangosol) or Gavin (Hibernate).

    Drop me an email (cpurdy at tangosol dot com) and cc: our "support" address too, and we'll get you a copy of the Hibernate integration documentation.

    Peace,

    Cameron Purdy
    Tangosol Coherence: Clustered Shared Memory for Java
  3. we are using Hibernate 2.1.x/Spring in production with EHCache as our second level caching..we plan to upgrade to OSCache because it supports cache Clustering via JMS.

    In regards to Cache-locking from what i read JBoss Cache is sutiable for production use..make sure your configuration settings are correct.

    i suggest u simply use EHCache with Hibernate 2.1.x..we use it and it works nicely...