[
https://issues.apache.org/jira/browse/JCS-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Murali Thirugnanam updated JCS-239:
-----------------------------------
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.
{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");
testCache.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 Application1 is not taking effect in
Application2.
Attaching the cache.ccf for both server and client for your reference.
[^cache-server.ccf]
[^cache-client.ccf]
was:
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 other applications 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");
testCache.put(key, value);
//Get:
cacheValue = cache.get(key);
//Remove:
cache.remove(key);
{code}
> 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
> 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");
> testCache.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 Application1 is not taking effect in
> Application2.
> 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)