0 Replies Latest reply on Feb 23, 2009 12:07 AM by Pradeep

    Second levele caching: Database connection issue in load tes

    Pradeep Newbie

      I am new to JBoss caching and trying to use second level caching with ejb3 entity beans. By looking at the document I have configured my entity bean to use jboss caching as second level caching. It is failing in load testing. I am getting an error related to database connection availablity.

      Using JBoss Cache 3.0.2

      Configurations used:

      I have configured persistence.xml with the following properties
      name="hibernate.cache.use_second_level_cache" value="true"
      name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook" name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache" name="hibernate.cache.region_prefix" value="myTestRegion"

      At the entity, I have mentioned to cache the entity through an annotation
      @Cache(region="myRegion", usage = CacheConcurrencyStrategy.READ_ONLY)

      Database connection pool size is configured for max of 5 connections. While load testing, after few requests been served, application is throwing an error related to data base connection(Connection not avaialable).

      Any configuration that I am missing?
      When entity is configured for caching, why it is looking for the database connection? is that entity still holding back the database connection?

      Thanks in advance