HAPojo pojo = new HAPojo();
pojo.setData(data);
try {
HAPojo value = null;
try {
value = HighAvailabilityProvider.INSTANCE.loadFrom(backingStore, new StickyKey(nonce), null);
} catch (Exception ex) {
LOGGER.log(Level.WARNING, " exception during load command ", ex);
}
if (value != null) {
final String message = "Nonce Repeated : Nonce Cache already contains the nonce value :" + nonce;
LOGGER.log(Level.WARNING, LogStringsMessages.WSS_0815_NONCE_REPEATED_ERROR(nonce));
throw new NonceManager.NonceException(message);
} else {
HaInfo haInfo = HaContext.currentHaInfo();
if (haInfo != null) {
HaContext.udpateReplicaInstance(HighAvailabilityProvider.INSTANCE.saveTo(backingStore, new StickyKey(nonce, haInfo.getKey()), pojo, true));
} else {
final StickyKey stickyKey = new StickyKey(nonce);
final String replicaId = HighAvailabilityProvider.saveTo(backingStore, stickyKey, pojo, true);
HaContext.updateHaInfo(new HaInfo(stickyKey.getHashKey(), replicaId, false));
}
LOGGER.log(Level.INFO, " nonce {0} saved ", nonce);
}
} catch (Exception ex) {