RangerPluginActivityLogger { @PostConstruct public void init() { pluginActivityAuditCommitInline = PropertiesUtil.getBooleanProperty("ranger.plugin.activity.audit.commit.inline", false); LOG.info("ranger.plugin.activity.audit.commit.inline = " + pluginActivityAuditCommitInline); if (pluginActivityAuditCommitInline) { LOG.info("Will use TransactionManager for committing scheduled work"); } else { LOG.info("Will use separate thread for committing scheduled work"); } }  @PostConstruct void init(); void commitAfterTransactionComplete(Runnable commitWork);  }
@Test public void test2Init() { pluginActivityAuditCommitInline = false; rangerPluginActivityLogger.init(); }
@Test public void test4Init() { pluginActivityAuditCommitInline = true; rangerPluginActivityLogger.init(); }