@Test public void onTransactionChainFailed() throws Exception { chainListener.onTransactionChainFailed(mock(TransactionChain.class), mock(Transaction.class), mock(Exception.class)); verify(dataBroker, times(2)).createTransactionChain(any(TransactionChainListenerImpl.class)); }
@Override public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { datastoreAccess.reinitializeChain(); LOG.warn("{} Transaction chain failed creating new one.", datastoreAccess); if (LOG.isDebugEnabled()) { LOG.debug("Transaction chain failed ", cause); } }
TransactionChainListenerImpl implements TransactionChainListener { @Override public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { datastoreAccess.reinitializeChain(); LOG.warn("{} Transaction chain failed creating new one.", datastoreAccess); if (LOG.isDebugEnabled()) { LOG.debug("Transaction chain failed ", cause); } } }
TransactionChainListenerImpl implements TransactionChainListener { @Override public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { datastoreAccess.reinitializeChain(); LOG.warn("{} Transaction chain failed creating new one.", datastoreAccess); if (LOG.isDebugEnabled()) { LOG.debug("Transaction chain failed ", cause); } } TransactionChainListenerImpl(DatastoreAccess datastoreAccess); }
TransactionChainListenerImpl implements TransactionChainListener { @Override public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { datastoreAccess.reinitializeChain(); LOG.warn("{} Transaction chain failed creating new one.", datastoreAccess); if (LOG.isDebugEnabled()) { LOG.debug("Transaction chain failed ", cause); } } TransactionChainListenerImpl(DatastoreAccess datastoreAccess); @Override void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause); @Override void onTransactionChainSuccessful(TransactionChain chain); }
TransactionChainListenerImpl implements TransactionChainListener { @Override public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { datastoreAccess.reinitializeChain(); LOG.warn("{} Transaction chain failed creating new one.", datastoreAccess); if (LOG.isDebugEnabled()) { LOG.debug("Transaction chain failed ", cause); } } TransactionChainListenerImpl(DatastoreAccess datastoreAccess); @Override void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause); @Override void onTransactionChainSuccessful(TransactionChain chain);  }