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
I have configured persistence.xml with the following properties
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 I say cache this entity, why it is looking for the database connection, is that entity still holding back the database connection?
Thanks in advance
what's the error message?