0 Replies Latest reply on Jan 24, 2013 4:11 AM by tomas11

    KeyAffinityService.getKeyForAddress(address) seems not to work

    tomas11 Novice

      We have this scenario


      1. Two nodes and CacheManager is running in Distribution mode

      2. First node has member address cacheManager-63748 and second cacheManager-22062

      3. I want from first node put something into cache and be sure that data are written physically (since it is distributed mode) to seconds cache


      How this can be achieved?

      I tried to use KeyAffinityService with keyAffinityService.getKeyForAddress(address). But this one fails (java.lang.IllegalStateException: Address cacheManager-22062 is no longer in the cluster) if I want to generate key.


      This is how it looks

      1. node1 - cacheManager-63748

          node2 - cacheManager-22062

      2. On node1 keyAffinityService.getKeyForAddress(cacheManager-63748)   - WORKS

      3. On node1 keyAffinityService.getKeyForAddress(cacheManager-22062)   - NOT WORKS - java.lang.IllegalStateException: Address cacheManager-22062 is no longer in the cluster


      Any idea?