caching - 如何配置Dynacache CacheProvider?

标签 caching websphere

我正在尝试实现 Dynacache CacheProvider 但遇到问题。这是我所做的:

  • 我的 Dynacache CacheProvider 实现 jar 位于 D:\IBM\WebSphere85\AppServer\lib 下
  • 我已使用正确的 CacheProvider 实现类将 com.ibm.ws.cache.CacheConfig.cacheProviderName 配置为 JVM 定制属性。
  • 在 D:\IBM\WebSphere85\AppServer\properties 下创建了 cacheinstance.properties,并使用相关设置(包括 com.ibm.ws.cache.CacheConfig.cacheProviderName 正确的类名称值)。
  • 我的 cacheinstance.properties 也是 Dynacache CacheProvider 实现 jar 的一部分。
  • 我已将对象缓存实例配置为具有新的动态缓存。它还将 com.ibm.ws.cache.CacheConfig.cacheProviderName 作为定制系统属性。
  • 我的应用程序使用以下内容来访问缓存:

代码:

Properties props = new Properties();                               
props.put("com.ibm.ws.cache.CacheConfig.cacheProviderName","com.myCacheProvider");
map = (DistributedObjectCache)DistributedObjectCacheFactory.getMap("mycache",props);

当应用程序尝试访问 DynaCache 时,我收到以下信息:

[9/18/12 10:10:52:917 EDT] 00000050 ServerCache   E   DYNA1066E: Unable to initialize the cache provider "com.myCacheProvider". The Dynamic cache will be used to create the cache instance "default" instead of the configured cache provider.
[9/18/12 10:10:52:919 EDT] 00000050 ServerCache   E   ENGLISH ONLY MESSAGE: cacheProvider is null. Check for the cache provider libraries 
[9/18/12 10:10:52:920 EDT] 00000050 ServerCache   I   DYNA1001I: WebSphere Dynamic Cache instance named default initialized successfully.

我使用的是 WAS 8.5。

有什么想法以及如何调试吗?

最佳答案

盖伊,

我会打开 Dyna 缓存跟踪来查看发生此错误的原因

跟踪字符串: com.ibm.ws.cache.=all:com.ibm.ws.drs.=all

这应该为我们提供有关正在发生的事情的线索,并且根据我们从跟踪中看到的内容,将为我们提供下一步该做什么的信息。

HTH

关于caching - 如何配置Dynacache CacheProvider?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12550653/

相关文章:

java - 是否可以将jsp响应缓存在浏览器中以防止jsp在下一个请求上执行?

javascript - jquery 1.11 选项卡禁用缓存不起作用

mysql - 优化 MYSQL 查询(InnoDB 表)

java - 在全局事务中运行的本地事务的正确含义是什么?

java - Websphere 管理工具

caching - 在网站上提供图像和其他静态内容的最快方法(/使加载速度更快)是什么?

php - 如何使用 HTTP header 缓存动态 CSS?

linux - 将 Websphere Portal 8.5 从 AIX 克隆到 Linux

java - 使用反射来调用以 WebSphere 数据库连接作为参数的方法

Websphere 配置文件创建卡在 importConfigArchive 处