Keep in mind that net.sf.ehcache.Cache should be in the classpath (I'm not sure, but I think ehcache-core.jar contains this class) if you want to use EhCahceProvider. Here is his signature
@Name("org.jboss.seam.cache.cacheProvider")
@Scope(APPLICATION)
@BypassInterceptors
@Install(value = false, precedence=BUILT_IN, classDependencies="net.sf.ehcache.Cache")
@AutoCreate
public class EhCacheProvider extends CacheProvider<CacheManager> {
Note the classDependencies attribute. Its documentation is understandable.
Indicates that the component should not be installed unless class definitions are specified in the classpath
, classpath net.sf.ehcache.Cache ,
<cache:eh-cache-provider/>
, , @In-jection,
ApplicationContext.getContext().get("cacheProvider");
UPDATE
- < cache: eh-cache-provider/ > . , (. ).
-,
, CacheProvider null, @In true, . - , CacheProvider .
assert cacheProvider!= null
-,
- , cacheProvider.instance(). . CacheProvider??? .
-,