unable to inject seam cache provider

Posted by Joshua on Stack Overflow See other posts from Stack Overflow or by Joshua
Published on 2010-06-16T10:22:44Z Indexed on 2010/06/17 4:43 UTC
Read the original article Hit count: 345

Filed under:
|
|

Env: Seam 2.2, ehcache-core 2.1.0

I tried injecting the CacheProvider using the following call in my bean scoped for session

    @In CacheProvider cacheProvider;

    WEB-INF\components.xml contains the following line to enable the cache provider
    <cache:eh-cache-provider/>

The above configuration seems to return a null value for the cache provider


Using the cache provider like this         
CacheProvider cacheProvider = CacheProvider.instance();
throws the following warning

    15:29:27,586 WARN [CacheManager] Creating a new instance of CacheManager using
    the diskStorePath "C:\DOCUME~1\user5\LOCALS~1\Temp\" which is already used by an
    existing CacheManager.
    The source of the configuration was net.sf.ehcache.config.generator.Configuratio
    nSource$DefaultConfigurationSource@15ed0f9.
    The diskStore path for this CacheManager will be set to C:\DOCUME~1\user5\LOCALS
    ~1\Temp\\ehcache_auto_created_1276682367586.
    To avoid this warning consider using the CacheManager factory methods to create
    a singleton CacheManager or specifying a separate ehcache configuration (ehcache
    .xml) for each CacheManager instance.

What am I missing here?

© Stack Overflow or respective owner

Related posts about caching

Related posts about seam