I've done a simple example where I've tried to integrate Spring 3.1 Cacheable annotation together with Ehcache.
But I can't get it to work, I'm using a simple servlet that works just fine with mvc but when I'm using breakpoints the cache just doesnt work.
It manages to store the cache but the interceptor don't seem to pick it up. And even more strange when I asked a friend to test this the results varied from time to time. Some times it intercepted the cache, other times it ignore it. But I can't get it to intercept the cache even once.
I'm running this on glassfish 2.1.1.
I add all the code to the files in the example here, I wasnt allowed to upload rar files here so I couldnt.
If anyone wants it please let me know where I can upload or give me your email and I'll send it.
If spring 3.1 doesnt work with ehcache, how can I do it without ehcache and configure the lifetime of the caches and such?
I will mark this as resolved because I found the error.
The problem was that I didnt create the class in the spring context, nor by autowired or bean. And of course the spring context can create a cache interceptor if I make that mistake.
subject: Spring 3.1-M1 Cacheable annotation with Ehcache configuration