I am trying to set up a cluster of Infinispan for remote access, the client should be just client (not a member of Infinispan). I learned that it can start infinispan with the given command line like ./startService.sh -r hotrod -c my.xml. But is it the only way, can I start with hotrod protocol programmatically like:
EmbeddedCacheManager manager =
new
DefaultCacheManager(
"infinispan-config-file.xml"
);
Configuration dcc = cacheManager.getDefaultCacheConfiguration();
Configuration c =
new
ConfigurationBuilder().read(dcc).clustering().cacheMode(CacheMode.DIST_SYNC).l1().lifespan(60000L).protocol(Configuration.HOTROD).build();
Comments