What is a proper way to turn on ehcache inside the OSGi container with Blueprint. To turn on ehcache for the non-osgi, non-blueprint projects we simply use spring annotation:
org.springframework.cache.annotation.Cacheable
Inside java:
@Cacheable
public void method() {
}
In xml configuration:
<beans xmlns:cache="http://www.springframework.org/schema/cache"
<cache:annotation-driven/>
...
Unfortunately it's not the case inside OSGi and Blueprint because we cannot mix Blueprint with Spring. I've tried and got an exception that the namespace handler was not found. Is this possible with the @Cacheable annotation or should we rather try ehcache without spring support?
I use Karaf 2.3.0.redhat-610379, JBoss Fuse 6.1.0