0 Replies Latest reply on Aug 28, 2013 7:32 AM by darkspirit

    Extending the distributed Quickstart-Tutorial

    darkspirit

      Hi there,

       

      I am trying to use the quickstart distributed tutorial as starting point for a more complex scenario. The nodes Node0 - Node2 are connecting to each other automatically. I wonder what needs to be done to configure the nodes so that an external application can connect to the cache.

       

      Here is how the nodes are configured:

         public static EmbeddedCacheManager createCacheManagerProgramatically() {
            return new DefaultCacheManager(
                  GlobalConfigurationBuilder.defaultClusteredBuilder()
                        .transport().addProperty("configurationFile", "jgroups.xml")
                        .defaultTransport()
                        .build(),
                  new ConfigurationBuilder()
                        .clustering()
                           .cacheMode(CacheMode.DIST_SYNC)
                           .hash().numOwners(1)
                        .build()
            );
         }
      

       

      And this is the code my application uses to try to connect to the nodes (running on a machine with the ip 192.168.2.3):

      RemoteCacheManager cacheManager = new RemoteCacheManager("192.168.2.3");
      cache = cacheManager.getCache("default");
      

       

      As far as I understood, the nodes are creating a Hotrod endpoint by default. Thats why the nodes are connecting to each other automatically. But for some reason the application is not able to connect to this node, so the question is what needs to be done to connect them all together?