开发者

Infinispan as Hibernate 2LC: NamedCacheNotFoundException

I currently use JBossCache 3.2 as a Hibernate 2nd level cache for clustered caching of entities in a EJB3 environment (GlassFish 2) which runs fine. Now I'm evaluating using Infinispan 4.2.1 instead and to my surprise I get NamedCacheNotFoundExceptions.

I use annotations at entity level like

@Cache(usage = CacheCo开发者_StackOverflow中文版ncurrencyStrategy.TRANSACTIONAL, region = "myRegion")

and the exeptions are like

org.infinispan.CacheException: org.infinispan.manager.NamedCacheNotFoundException: Cache: myRegion
  at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:115)
  at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:126)
  at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:231)
  at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:218)
  at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:201)
  at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:194)
  at org.infinispan.interceptors.InvalidationInterceptor.invalidateAcrossCluster(InvalidationInterceptor.java:220)
  ....

Looking via jmx I can see a corresponding MBean but it's CacheName is like myRegion(invalidation_sync). The suffix (invalidation_sync) seems to be added by Infinispan.

Is this the root cause of my problem? How to come around it? My Infinispan config is largely the one that comes with hibernate-infinsipan but with jmx enabled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜