5 Replies Latest reply on Feb 13, 2012 11:10 PM by jerome2000

    Is there any way to start Infinispan with HotRod protocol programmatically?

    jerome2000

      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 = newConfigurationBuilder().read(dcc).clustering().cacheMode(CacheMode.DIST_SYNC).l1().lifespan(60000L).protocol(Configuration.HOTROD).build();