I have a util module that produces a jar to be used in other applications. I\'d like this module to use caching and would prefer to use Spring\'s annotation-driven
Spring currently expects the cacheManager to be a Singleton. This is something that the ehcache-spring-annotations project ran into and I've yet to see the request fulfilled. http://code.google.com/p/ehcache-spring-annotations/issues/detail?id=76
As with all things Java and Spring you do have the option to reimplement the class.
http://forums.terracotta.org/forums/posts/list/5618.page#27960 provides a base explanation of what some people have come up with as a workaround and
Is the actual code they came up with. The approach does create a convention to follow but it would be easy enough to reimplement this with your own version if you do not like the actual approach described.