views:

291

answers:

2

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.

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

+1  A: 

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.

Rich Kroll
That is basically what I ended up testing. Thanks!
Petteri Hietavirta
A: 

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.

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.

Galder Zamarreño