[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Entity and second_lecel_cache in JBoss AS 5

jimmyw83 do-not-reply at jboss.com
Wed Nov 26 05:37:06 EST 2008


I have big problems to enable entity cache with hibernate and jbosscache in JBoss 5.0.0.

The biggest problem is that i dont know how to monitor my cache.

I have a EJB project with entity-beans and remote facades to manage persistence.
And im only trying to setup a local-machine entity cache, and hopefully a second_level_cache aswell.

I set the property of hibernate.cache.region.factory_class to org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory in persistence.xml

And when i deploy the project, everything looks okay.
How do i log when hibernate cache makes the decision of putting entitys and querys got, to the cache.
And how can i reach the cache and see whats in it?

Is there any other source then persitence.xml you need to change to enable cache?

My persitence.xml look like this

  | <properties>
  |             <property name="hibernate.show_sql" value="false"/>
  |             <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>            
  |             
  |             <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory"/>
  |             <property name="hibernate.cache.use_query_cache" value="true"/>
  |             <property name="hibernate.cache.use_second_level_cache" value="true"/>
  |             <property name="hibernate.cache.region.jbc2.query.localonly" value="true"/>           
  |             <property name="hibernate.current_session_context_class" value="jta"/> 
  |             -- snip --
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192403#4192403

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192403



More information about the jboss-user mailing list