import org.onap.aai.champcore.ChampTransaction;
import org.onap.aai.champcore.exceptions.ChampTransactionException;
import org.onap.aai.champcore.ChampTransaction;
import org.onap.aai.champcore.exceptions.ChampTransactionException;
// Request a threaded transaction object from the graph.
this.threadedTransaction = aGraphInstance.tx().createThreadedTx();
// Request a threaded transaction object from the graph.
this.threadedTransaction = aGraphInstance.tx().createThreadedTx();
- LOGGER.error("Maxed out commit attempt retries, client must handle exception and retry", e);
+ LOGGER.error(ChampCoreMsgs.CHAMPCORE_TINKERPOP_TRANSACTION_ERROR,
+ "Maxed out commit attempt retries, client must handle exception and retry. " + e.getMessage());
threadedTransaction.tx().rollback();
throw new ChampTransactionException(e);
}
// Calculate how long we will wait before retrying...
final long backoff = (long) Math.pow(2, i) * initialBackoff;
threadedTransaction.tx().rollback();
throw new ChampTransactionException(e);
}
// Calculate how long we will wait before retrying...
final long backoff = (long) Math.pow(2, i) * initialBackoff;
- LOGGER.warn("Caught exception while retrying transaction commit, retrying in " + backoff + " ms");
+ LOGGER.warn(ChampCoreMsgs.CHAMPCORE_TINKERPOP_TRANSACTION_WARN,
+ "Caught exception while retrying transaction commit, retrying in " + backoff + " ms");
- LOGGER.error("Maxed out rollback attempt retries, client must handle exception and retry", e);
+ LOGGER.error(ChampCoreMsgs.CHAMPCORE_TINKERPOP_TRANSACTION_ERROR,
+ "Maxed out rollback attempt retries, client must handle exception and retry. " + e.getMessage());
throw new ChampTransactionException(e);
}
// Calculate how long we will wait before retrying...
final long backoff = (long) Math.pow(2, i) * initialBackoff;
throw new ChampTransactionException(e);
}
// Calculate how long we will wait before retrying...
final long backoff = (long) Math.pow(2, i) * initialBackoff;
- LOGGER.warn("Caught exception while retrying transaction roll back, retrying in " + backoff + " ms");
+ LOGGER.warn(ChampCoreMsgs.CHAMPCORE_TINKERPOP_TRANSACTION_WARN,
+ "Caught exception while retrying transaction roll back, retrying in " + backoff + " ms");