return replayCache;
}
String replayCacheString = config.getTokenReplayCache();
String cacheKey = CACHE_KEY_PREFIX + "-" + config.getName();
if (replayCacheString == null || "".equals(replayCacheString)) {
replayCache = new EHCacheTokenReplayCache(cacheKey);
} else {
try {
Class<?> replayCacheClass = Loader.loadClass(replayCacheString);
replayCache = (TokenReplayCache<String>) replayCacheClass.newInstance();
} catch (ClassNotFoundException e) {
replayCache = new EHCacheTokenReplayCache(cacheKey);
} catch (InstantiationException e) {
replayCache = new EHCacheTokenReplayCache(cacheKey);
} catch (IllegalAccessException e) {
replayCache = new EHCacheTokenReplayCache(cacheKey);
}
}
return replayCache;
}