如何验证群集中Hibernate二级缓存的正确操作?

[英]How to verify correct operation of Hibernate second level caching in a cluster?


I am wondering how to verify that Hibernate's L2 cache performs correctly. I have an application running on a cluster of JBoss 5 instances with JBoss Cache. Load testing would answer the question of performance.

我想知道如何验证Hibernate的L2缓存是否正确执行。我有一个使用JBoss Cache在JBoss 5实例集群上运行的应用程序。负载测试将回答性能问题。

But how to make sure that cluster related issues like the cache invalidation between nodes works like it should be?

但是如何确保集群之间的缓存失效之类的集群相关问题应该如此?

2 个解决方案

#1


I would suggest requesting resources by IP address. On server A, you can perform an update, and then request that same resource from server B. On update the resource should be invalidated from participating servers in the cluster, so the resulting request on server B should be the (newly) updated resource.

我建议通过IP地址请求资源。在服务器A上,您可以执行更新,然后从服务器B请求相同的资源。在更新时,资源应该从群集中的参与服务器失效,因此服务器B上的结果请求应该是(新)更新的资源。

#2


The easiest would be to check the 2nd level cache contents via the embedded console that JBoss 5 comes with and do an exercise like the one @Rich Kroll suggests.

最简单的方法是通过JBoss 5附带的嵌入式控制台检查二级缓存内容并进行类似@Rich Kroll建议的练习。

You can have a look at the Cache statistics via the embedded console that JBoss 5 comes with. It'll show the number of invalidations that have happened.

您可以通过JBoss 5附带的嵌入式控制台查看Cache统计信息。它将显示已发生的失效数量。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2009/05/25/358ea96d731625cfc9e7daf2c18f36c2.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告