return null;
}
Endpoint ep = message.getExchange().get(Endpoint.class);
if (ep != null && ep.getEndpointInfo() != null) {
EndpointInfo info = ep.getEndpointInfo();
synchronized (info) {
ReplayCache replayCache =
(ReplayCache)message.getContextualProperty(instanceKey);
if (replayCache == null) {
replayCache = (ReplayCache)info.getProperty(instanceKey);
}
if (replayCache == null) {
ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance();
String cacheKey = instanceKey;
if (info.getName() != null) {
cacheKey += "-" + info.getName().toString().hashCode();
}
replayCache = replayCacheFactory.newReplayCache(cacheKey, message);
info.setProperty(instanceKey, replayCache);
}
return replayCache;
}
}
return null;