[
https://issues.jboss.org/browse/ISPN-1207?page=com.atlassian.jira.plugin....
]
hari yalamanchili updated ISPN-1207:
------------------------------------
Summary: Jboss 6.0 Final Hibernate level 2 Cache (was: Jboss 6.0 Final Hiberlate
level 2)
Description:
Hi,
I am trying to integrate infinispan to get hibernate level 2 cache using default setting.
Below is my configuration in brief
1) presistence .xml
<property name="hibernate.cache.use_query_cache"
value="true"/>
<property name="hibernate.cache.use_second_level_cache"
value="true"/>
<property name="hibernate.cache.infinispan.statistics"
value="true" />
<property name="hibernate.cache.infinispan.cachemanager"
value="java:CacheManager/entity" />
<property name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.infinispan.JndiInfinispanRegionFactory"/>
<property name="javax.persistence.sharedCache.mode"
value="ENABLE_SELECTIVE"/>
<property name="hibernate.generate_statistics"
value="true"/>
2) query.setHint("org.hibernate.cacheable", true);
3) @Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
Problem: I do not see entity beans being cached. No statistics on hits & misses. Sql
query seems to be executed every time with out hitting cache. I do not see any errors in
the log, it seems infinispan is initializing fine. I am not sure what else is invloved,
tried everything in the forum. Here is infinispan log in Brief
2011-06-27 14:58:08,817 DEBUG [org.infinispan.interceptors.InterceptorChain] Interceptor
chain is:
> org.infinispan.interceptors.InvocationContextInterceptor
> org.infinispan.interceptors.CacheMgmtInterceptor
> org.infinispan.interceptors.TxInterceptor
> org.infinispan.interceptors.NotificationInterceptor
> org.infinispan.interceptors.LockingInterceptor
> org.infinispan.interceptors.CallInterceptor
2011-06-27 14:58:08,817 DEBUG
[org.infinispan.jmx.ResourceDMBean] @MBean description set - General statistics such as
timings, hit/miss ratio, etc.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that manages the cache's participation in JTA transactions.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Manages all remote calls to remote cache instances in the cluster.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Manager that handles MVCC locks for entries
was:
Hi,
I am trying to integrate infinispan to get hibernate level 2 cache using default setting.
Below is my configuration in brief
1) presistence .xml
<property name="hibernate.cache.use_query_cache"
value="true"/>
<property name="hibernate.cache.use_second_level_cache"
value="true"/>
<property name="hibernate.cache.infinispan.statistics"
value="true" />
<property name="hibernate.cache.infinispan.cachemanager"
value="java:CacheManager/entity" />
<property name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.infinispan.JndiInfinispanRegionFactory"/>
<property name="javax.persistence.sharedCache.mode"
value="ENABLE_SELECTIVE"/>
<property name="hibernate.generate_statistics"
value="true"/>
2) query.setHint("org.hibernate.cacheable", true);
3) @Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
Problem: I do not see entity beans being cached. No statistics on hits & misses. Sql
query seems to be executed every time. I tried one EJB bean and I am trying to access it
using primary key. I do not see any errors in the log, it seems infispan is initializing
fine. Here is log in Brief
2011-06-27 14:58:08,817 DEBUG [org.infinispan.interceptors.InterceptorChain] Interceptor
chain is:
> org.infinispan.interceptors.InvocationContextInterceptor
> org.infinispan.interceptors.CacheMgmtInterceptor
> org.infinispan.interceptors.TxInterceptor
> org.infinispan.interceptors.NotificationInterceptor
> org.infinispan.interceptors.LockingInterceptor
> org.infinispan.interceptors.CallInterceptor
2011-06-27 14:58:08,817 DEBUG
[org.infinispan.jmx.ResourceDMBean] @MBean description set - General statistics such as
timings, hit/miss ratio, etc.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that manages the cache's participation in JTA transactions.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Manages all remote calls to remote cache instances in the cluster.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set -
Manager that handles MVCC locks for entries
Jboss 6.0 Final Hibernate level 2 Cache
---------------------------------------
Key: ISPN-1207
URL:
https://issues.jboss.org/browse/ISPN-1207
Project: Infinispan
Issue Type: Release
Components: Cache Server
Affects Versions: 4.2.0.Final
Environment: Jboss 6.0 Final
Reporter: hari yalamanchili
Assignee: Manik Surtani
Labels: new_and_noteworthy
Original Estimate: 1 hour, 40 minutes
Remaining Estimate: 1 hour, 40 minutes
Hi,
I am trying to integrate infinispan to get hibernate level 2 cache using default setting.
Below is my configuration in brief
1) presistence .xml
<property name="hibernate.cache.use_query_cache"
value="true"/>
<property name="hibernate.cache.use_second_level_cache"
value="true"/>
<property name="hibernate.cache.infinispan.statistics"
value="true" />
<property name="hibernate.cache.infinispan.cachemanager"
value="java:CacheManager/entity" />
<property name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.infinispan.JndiInfinispanRegionFactory"/>
<property name="javax.persistence.sharedCache.mode"
value="ENABLE_SELECTIVE"/>
<property name="hibernate.generate_statistics"
value="true"/>
2) query.setHint("org.hibernate.cacheable", true);
3) @Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
Problem: I do not see entity beans being cached. No statistics on hits & misses. Sql
query seems to be executed every time with out hitting cache. I do not see any errors in
the log, it seems infinispan is initializing fine. I am not sure what else is invloved,
tried everything in the forum. Here is infinispan log in Brief
2011-06-27 14:58:08,817 DEBUG [org.infinispan.interceptors.InterceptorChain] Interceptor
chain is:
>> org.infinispan.interceptors.InvocationContextInterceptor
>> org.infinispan.interceptors.CacheMgmtInterceptor
>> org.infinispan.interceptors.TxInterceptor
>> org.infinispan.interceptors.NotificationInterceptor
>> org.infinispan.interceptors.LockingInterceptor
>> org.infinispan.interceptors.CallInterceptor
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- General statistics such as timings, hit/miss ratio, etc.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- Component that manages the cache's participation in JTA transactions.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- Manages all remote calls to remote cache instances in the cluster.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- Component that acts as a manager, factory and container for caches in the system.
2011-06-27 14:58:08,817 DEBUG [org.infinispan.jmx.ResourceDMBean] @MBean description set
- Manager that handles MVCC locks for entries
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira