eXtreme Scale Object Grid Unresponsive after 1 hour approx

60 Views Asked by At

I am using Spring ObjectGridClientBean in my application to access eXtreme Scale distributed Object Grid.

After server startup - it works fine able read/write from cache; but after sometime (I believe it is about 1 hour) it becomes unresponsive - meaning, cannot read/write anything from/to the cache.

//Setup
@Bean
public ObjectGridClientBean wxsGridClient() {
    ObjectGridClientBean oGCB = new ObjectGridClientBean();
    oGCB.setObjectGridName("myGrid");
    oGCB.setCatalogServiceDomain(wxsCSDomain);
    return oGCB;
}

@Bean
public ObjectGridCatalogServiceDomainBean wxsCSDomain() {
    ObjectGridCatalogServiceDomainBean oGCSDB = new ObjectGridCatalogServiceDomainBean();
    oGCSDB.setCatalogServiceEndpoints(
        catalogServer.getCatalogendpoint() + ApplicationConstants.COLON + catalogServer.getCatalogport());
    return oGCSDB;
}

private List<Cache> createCaches() {
    List<Cache> cacheList = new ArrayList<Cache>();
    cacheObjects.forEach((cacheName, cacheMap) -> {
        ObjectGridCache oGC = new ObjectGridCache();
        oGC.setName(cacheName);
        oGC.setMapName(cacheMap);
        oGC.setObjectGridClient(wxsGridClient);
        cacheList.add(oGC);
    });
    return cacheList;
}

@Bean
public CacheManager cacheManager() {
    SimpleCacheManager simpleCacheManager = new SimpleCacheManager();
    simpleCacheManager.setCaches(createCaches());
    return simpleCacheManager;
}

Here is the usage scenario

//Usage scenario
public APIToken retrieveValidToken() throws Exception {

    APIToken APIToken = null;
    if (null != cacheManager.getCache("APITokenCache").get(API_TOKEN)) {
        APIToken = cacheManager.getCache("APITokenCache").get(API_TOKEN, APIToken.class);
    }
    if (isAPITokenValid(APIToken)) {
        return APIToken;
    }
    return null;
}

The first call to cacheManager.getCache("APITokenCache").get(API_TOKEN) returns null (after 1 hour). What am I doing wrong? Is there a timeout that occurs which is causing this unresponsiveness? Is there an Object Grid session (or session configuration) that I need to access from the Client Bean and control it's timeout?

0

There are 0 best solutions below