You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Vandahl (Jira)" <ji...@apache.org> on 2023/11/02 20:15:00 UTC

[jira] [Resolved] (JCS-239) CacheAccess put/remove in one application is not getting reflected in another application

     [ https://issues.apache.org/jira/browse/JCS-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl resolved JCS-239.
--------------------------------
      Assignee: Thomas Vandahl
    Resolution: Duplicate

Work will be done in JCS-240

> CacheAccess put/remove in one application is not getting reflected in another application
> -----------------------------------------------------------------------------------------
>
>                 Key: JCS-239
>                 URL: https://issues.apache.org/jira/browse/JCS-239
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache, RMI Remote Cache
>    Affects Versions: jcs-3.1
>            Reporter: Murali Thirugnanam
>            Assignee: Thomas Vandahl
>            Priority: Blocker
>         Attachments: cache-client.ccf, cache-server.ccf
>
>
> 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.
> {code:java}
> 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);
> {code}
> *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] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)