ENV:缝2.2,ehcache的核心2.1.0无法注入煤层缓存提供
我试图用我的豆以下调用注入的CacheProvider范围的会话
@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
[email protected]
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.
我在想什么这里?
我使用的Ehcache-core.jar添加我还需要ehcache.jar在一条警告消息lib文件夹? – Joe 2010-06-16 17:07:47
只是为了好奇:你有没有曾经使用过一些Cache提供者?你说你的@注入组件**似乎返回null **它不能返回null,因为来自@In注解的必需属性默认情况下是true **,这意味着它不能为空**。否则,你会得到一个由Seam抛出的异常。你遵循哪个教程? – 2010-06-19 20:34:32
它似乎没有引发异常,cacheProvider只是null。查询缓存和二级缓存似乎工作正常,虽然 – Joe 2010-06-22 07:30:16