Hibernate: Trouble enabling second level cache?

Please check my answer here for a working second-level-cache configuration.

Please check my answer here for a working second-level-cache configuration: Second Level Cache Configuration I hope it helps. UPDATE: Try this: Statistics stats = sessionFactory.getStatistics(); stats. SetStatisticsEnabled(true); SecondLevelCacheStatistics cacheStats = stats.

GetSecondLevelCacheStatistics(cacheRegion).

My configuration is the same (except you disable statistics) and it still isn't working. Why are misses and hits always zero? Shouldn't misses be some number if we weren't hitting the cache?

– Dave Jun 28 at 15:37 Don't you miss the annotation on the cached entities or the xml fragment in the ehcache. Xml? This example nicely works for me.

I don't know what can be the problem. – lepike Jun 28 at 16:03 I edited my resopnse -- I had the annotations. I think the cache is working but the statistics package isn't -- why else would it return zero for hits and misses always?

How do you enable the SecondLevelCacheStatistics? – Dave Jun 28 at 16:48 Please try the UPDATE section in my answer. I think this will enable statistics.

– lepike Jun 28 at 20:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions