Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-239

CacheAccess put/remove in one application is not getting reflected in another application

    XMLWordPrintableJSON

Details

    Description

      CacheAccess put/remove in one application is not getting reflected in another application.

      We are using Remote Cache Server which is deployed as an application in JBoss.
      We have applications like Application1 and Application2 deployed in same JBoss, which uses below code snippet to put/get/remove items to remote server.

      final ICompositeCacheManager cacheMgr = CompositeCacheManager.getInstance(); 
      final RemoteCacheAttributes rca = new RemoteCacheAttributes(); 
      final RemoteCacheFactory factory = new RemoteCacheFactory(); 
      rca.setRemoteLocation("localhost", 1101);     
      rca.setCacheName("testCache");     
      factory.initialize();     
      final RemoteCacheManager remoteCacheMgr = factory.getManager(rca , cacheMgr , new CacheEventLoggerDebugLogger(), new StandardSerializer());     
      AuxiliaryCache<CacheKey, CacheValue> testAuxCache = remoteCacheMgr.getCache(rca);   
      
      //Put:
      CacheAccess<CacheKey, CacheValue> cache = JCS.getInstance("testCache");
      cache.put(key, value);
      
      //Get:
      cacheValue = cache.get(key);
      
      //Remove:
      cache.remove(key);
      

      ISSUE:1
      Applicaiton1:
      1) put "element1"
      2) get "element1"

      Application2:
      1) get "element1"
      It is retuning null. Element is not available for Application2, which was put in Application1.

      ISSUE:2
      Assume an element "element2" is available in both the applications, If that element "element2" is removed from Application1, then it should not be available for Application2, which is expected. But the same element "element2" is still present in Application2.

      Problem is that an put/remove in one application is not taking effect in other applications.
      Attaching the cache.ccf for both server and client for your reference.
      cache-server.ccf
      cache-client.ccf

      Attachments

        1. cache-client.ccf
          1 kB
          Murali Thirugnanam
        2. cache-server.ccf
          1 kB
          Murali Thirugnanam

        Issue Links

          Activity

            People

              tv Thomas Vandahl
              tmuralimanohar Murali Thirugnanam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: