@Transactional(propagation = Propagation.REQUIRED) public PaymentLog createNewPaymentLog(TransactionAdapter tx, TransactionStatus transactionStatus) throws MissingTransactionInformationException { try { return paymentLogService.save(new PaymentLog( tx.getTransactionId(), tx.getCurrencyType(), transactionStatus)); } catch (DataIntegrityViolationException e) { // The payment log was probably created by another instance just now. // This is not an error because the other instance will process the transaction. return null; } }