"request will not be cached");
return true;
}
}
ConfigurationContext cfgCtx =
((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
if (cfgCtx == null) {
handleException("Unable to perform caching, "
+ " ConfigurationContext cannot be found", synCtx);
return false; // never executes.. but keeps IDE happy
}
if (synLog.isTraceOrDebugEnabled()) {
synLog.traceOrDebug("Looking up cache at scope : " + scope + " with ID : "
+ cacheKey);
}
// look up cache
Object prop = cfgCtx.getPropertyNonReplicable(CachingConstants.CACHE_MANAGER);
CacheManager cacheManager;
if (prop != null && prop instanceof CacheManager) {
cacheManager = (CacheManager) prop;
} else {
synchronized (cfgCtx) {
// check again after taking the lock to make sure no one else did it before us
prop = cfgCtx.getPropertyNonReplicable(CachingConstants.CACHE_MANAGER);
if (prop != null && prop instanceof CacheManager) {
cacheManager = (CacheManager) prop;
} else {
synLog.traceOrDebug("Creating/recreating the cache object");
cacheManager = new CacheManager();
cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
}
}
}
boolean result = true;