@Test public void test3CommitAfterTransactionComplete() { pluginActivityAuditCommitInline = true; rangerPluginActivityLogger.commitAfterTransactionComplete(commitWork); }
public void commitAfterTransactionComplete(Runnable commitWork) { if (pluginActivityAuditCommitInline) { if (LOG.isDebugEnabled()) { LOG.debug("Using TransactionManager for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } transactionSynchronizationAdapter.executeOnTransactionCompletion(commitWork); } else { if (LOG.isDebugEnabled()) { LOG.debug("Using separate thread for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } final long delayInMillis = 1000L; transactionService.scheduleToExecuteInOwnTransaction(commitWork, delayInMillis); } }
RangerPluginActivityLogger { public void commitAfterTransactionComplete(Runnable commitWork) { if (pluginActivityAuditCommitInline) { if (LOG.isDebugEnabled()) { LOG.debug("Using TransactionManager for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } transactionSynchronizationAdapter.executeOnTransactionCompletion(commitWork); } else { if (LOG.isDebugEnabled()) { LOG.debug("Using separate thread for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } final long delayInMillis = 1000L; transactionService.scheduleToExecuteInOwnTransaction(commitWork, delayInMillis); } } }
RangerPluginActivityLogger { public void commitAfterTransactionComplete(Runnable commitWork) { if (pluginActivityAuditCommitInline) { if (LOG.isDebugEnabled()) { LOG.debug("Using TransactionManager for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } transactionSynchronizationAdapter.executeOnTransactionCompletion(commitWork); } else { if (LOG.isDebugEnabled()) { LOG.debug("Using separate thread for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } final long delayInMillis = 1000L; transactionService.scheduleToExecuteInOwnTransaction(commitWork, delayInMillis); } }  }
RangerPluginActivityLogger { public void commitAfterTransactionComplete(Runnable commitWork) { if (pluginActivityAuditCommitInline) { if (LOG.isDebugEnabled()) { LOG.debug("Using TransactionManager for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } transactionSynchronizationAdapter.executeOnTransactionCompletion(commitWork); } else { if (LOG.isDebugEnabled()) { LOG.debug("Using separate thread for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } final long delayInMillis = 1000L; transactionService.scheduleToExecuteInOwnTransaction(commitWork, delayInMillis); } }  @PostConstruct void init(); void commitAfterTransactionComplete(Runnable commitWork); }
RangerPluginActivityLogger { public void commitAfterTransactionComplete(Runnable commitWork) { if (pluginActivityAuditCommitInline) { if (LOG.isDebugEnabled()) { LOG.debug("Using TransactionManager for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } transactionSynchronizationAdapter.executeOnTransactionCompletion(commitWork); } else { if (LOG.isDebugEnabled()) { LOG.debug("Using separate thread for committing work [pluginActivityAuditCommitInline:" + pluginActivityAuditCommitInline + "]"); } final long delayInMillis = 1000L; transactionService.scheduleToExecuteInOwnTransaction(commitWork, delayInMillis); } }  @PostConstruct void init(); void commitAfterTransactionComplete(Runnable commitWork);  }