How can I check if Hibernate second level caching is working correctly on a cluster?
I am wondering how to check if the Hibernate L2 cache is working correctly. I have an application running on a cluster of JBoss 5 instances with JBoss Cache. Load testing will answer the performance question.
But how do you ensure that cluster-related issues such as cache invalidation between nodes are how they should be?
a source to share
I would suggest requesting resources by IP address. On server A, you can upgrade and then request the same resource from server B. When upgrading, the resource must be invalid from the participating servers in the cluster, so the resulting request on server B must be a (new) updated resource.
a source to share
The easiest way is to check the contents of the L2 cache through the embedded console that JBoss 5 goes to and do an exercise like the one suggested by one contributor @Rich Kroll.
You can view the Cache stats through the built-in console that JBoss 5 goes to. It will show the number of invalid events that have occurred.
a source to share