- try {
- final RpcResult<TransactionStatus> result = tx.commit().get();
- if(!result.isSuccessful()) {
- LOG.error("Transaction {} failed", tx.getIdentifier());
+ final CheckedFuture<Void, TransactionCommitFailedException> result = tx.submit();
+ Futures.addCallback(result, new FutureCallback<Void>() {
+ @Override
+ public void onSuccess(Void aVoid) {
+ //NOOP
+ }
+
+ @Override
+ public void onFailure(Throwable throwable) {
+ LOG.error("Transaction {} failed.", tx.getIdentifier(), throwable);