-
1. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
jholusa Apr 24, 2017 6:26 AM (in response to sdcf_2006)Hi Fei,
unfortunately, the bad news is that creating cache via Hot Rod client is currently not supported. The good news is that this feature is planned AFAIK for 9.1.0.Alpha (but no promises).
Cheers,
Jiri
-
2. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
jholusa Apr 24, 2017 6:31 AM (in response to sdcf_2006)Just one more note, if you need to workaround it for now, it's possible to create cache via CLI, see Infinispan 9.0 Server Guide . Hope that this helps a bit for now.
Cheers,
Jiri
-
3. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
sdcf_2006 Apr 24, 2017 7:03 AM (in response to jholusa)Hi Jiri,
Thanks for the confirmation.
By the way, we've made some progress and see it's possible to create the remote cache using the JCache API with Infinispan JCache Impl. Like Infinispan 7.2 User Guide (30.2 Create a local cache) , instead of using default CachingProvider, we added infinispan-jcache-remote.jar and wildfly-controller.jar in classpath and used the "org.infinispan.jcache.remote.JCachingProvider" CachingProvider to create a cache on remote server.
It works as expected, but the problem is we don't see it documented in any Infinispan documentation. Can you let me know the reason, and is it OK to use this way?
final CachingProvider jcacheProvider = Caching.getCachingProvider("org.infinispan.jcache.remote.JCachingProvider");
final CacheManager jcacheManager = jcacheProvider.getCacheManager();
final MutableConfiguration<String, Object> config = new MutableConfiguration<String, Object>();
config.setStoreByValue(true).setTypes(String.class, Object.class);
final Cache<String, Object> cache = jcacheManager.createCache("MyRemoteCache", config);
Best Regards,
Fei
-
4. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
jholusa Apr 24, 2017 9:22 AM (in response to sdcf_2006)Hi Fei,
the documentation for JCachce is here Infinispan 9.0 User Guide , where an example is provided as is actually almost identical to yours, hence you're doing it right Or do you need any other information about Infinispan JCache integration?
Cheers,
Jiri
-
5. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
sdcf_2006 Apr 24, 2017 9:34 AM (in response to jholusa)Hi Jiri,
Actually I saw this example, but it only describes how to create a local cache. I can't find the description about creating a remote cache (e.g. using "org.infinispan.jcache.remote.JCachingProvider"). Just wondering if it's a feature hidden from the customers.
And due to some reason, we can only use Infinispan version 7.2.5 right now.
Best Regards,
Fei -
6. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
jholusa Apr 24, 2017 9:48 AM (in response to sdcf_2006)Hi Fei,
oh, sorry, I missed that. AFAIK there is no reason to hide this functionality, it's not in the documentation probably because nobody did it It would be super cool if you issued a simple pull request to enhance the documentation, could you? Otherwise, I will do it later. To summarize, your approach seems correct to me.
Thanks,
Jiri
-
7. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
sdcf_2006 Apr 24, 2017 10:02 AM (in response to jholusa)Hi Jiri,
Great! I'm really glad to contribute to the documentation change, but have never done that before. Should I follow the chapter 8 here Contributing to Infinispan ? I will try and let you know if there's any issue.
Best Regards,
Fei -
8. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
jholusa Apr 24, 2017 10:09 AM (in response to sdcf_2006)Hi Fei,
that would be truly awesome! This is the file you want to edit: infinispan/jcache.adoc at master · infinispan/infinispan · GitHub
I believe that you can modify exactly in the way as the part about creating of a local cache is written, hence it should be pretty easy. Just submit a PR and some developer will the review it and let you know if there are any issues.
Don't hesitate to reach me if you needed any help. Thank you for you collaboration, we really appreciate it!
Jiri
-
9. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
sdcf_2006 Apr 24, 2017 10:13 AM (in response to jholusa)Hi Jiri,
Cool... Got it! Will do it soon.
Best Regards,
Fei
-
10. Re: What is the best way to create/start a named cache when using remote server mode with Hot Rod client?
sdcf_2006 Apr 24, 2017 10:18 AM (in response to jholusa)Oh... by the way, do you know where to find the infinispan-jcache-remote.jar ? I couldn't see it in any of the distributions on Download - Infinispan .