2
我想使用MongoDB的作为cacche存储中的Infinispan根据政策异常使用的MongoDB作为Infinispan的缓存存储
我张贴了与异常
一起造成异常的代码的片段坚持清除的数据ConfigurationBuilder config = new ConfigurationBuilder();
MongoDBCacheStore strgBuilder = new MongoDBCacheStore();
ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence()
.addStore(MongoDBCacheStoreConfigurationBuilder.class)
.host("localhost")
.port(27017)
.timeout(1500)
.acknowledgment(0)
.username("")
.password("")
.database("infinispan_cachestore")
.collection("entries");
/* DefaultCacheManager manager=new DefaultCacheManager(b.build());
Cache ch=manager.getCache();
ch.put("username","sogani"); */
final Configuration configcache = b.build();
MongoDBCacheStoreConfiguration store = (MongoDBCacheStoreConfiguration) configcache.persistence().stores().get(0);
例外,我得到的是
java.lang.NoSuchMethodException: org.infinispan.loaders.mongodb.configuration.MongoDBCacheStoreConfigurationBuilder.
任何指针将是一个很大的帮助 日Thnx。