-1

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

lukastymo
  • 26,145
  • 14
  • 53
  • 66

1 Answers1

0

As you already mentioned one way is to use without spring, another one is to use Gemini-Blueprint instead of the Out-Of-The-Box Aries Blueprint. Gemini-Blueprint does support spring namespaces.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22