@Test public void shouldDetectJBossJTAStandaloneJTAManager() throws Exception { TransactionManager transactionManager = txLookup.getTransactionManager(); assertNotNull(transactionManager); assertTrue(transactionManager.getClass().getName().contains("arjuna")); transactionManager.begin(); Transaction tx = transactionManager.getTransaction(); assertNotNull(tx); tx.commit(); }
@Override public TransactionManager getTransactionManager() { return Stream.of(getTransactionManagerSuppliers()) .map(Supplier::get) .filter(Optional::isPresent) .map(Optional::get) .peek((transactionManager) -> LOGGER.debug("Found tx manager '{0}'", transactionManager.getClass().getName())) .findFirst() .orElseGet(() -> { LOGGER.debug(JcrI18n.warnNoTxManagerFound.text()); return new LocalTransactionManager(); }); }
DefaultTransactionManagerLookup implements TransactionManagerLookup { @Override public TransactionManager getTransactionManager() { return Stream.of(getTransactionManagerSuppliers()) .map(Supplier::get) .filter(Optional::isPresent) .map(Optional::get) .peek((transactionManager) -> LOGGER.debug("Found tx manager '{0}'", transactionManager.getClass().getName())) .findFirst() .orElseGet(() -> { LOGGER.debug(JcrI18n.warnNoTxManagerFound.text()); return new LocalTransactionManager(); }); } }
DefaultTransactionManagerLookup implements TransactionManagerLookup { @Override public TransactionManager getTransactionManager() { return Stream.of(getTransactionManagerSuppliers()) .map(Supplier::get) .filter(Optional::isPresent) .map(Optional::get) .peek((transactionManager) -> LOGGER.debug("Found tx manager '{0}'", transactionManager.getClass().getName())) .findFirst() .orElseGet(() -> { LOGGER.debug(JcrI18n.warnNoTxManagerFound.text()); return new LocalTransactionManager(); }); }  }
DefaultTransactionManagerLookup implements TransactionManagerLookup { @Override public TransactionManager getTransactionManager() { return Stream.of(getTransactionManagerSuppliers()) .map(Supplier::get) .filter(Optional::isPresent) .map(Optional::get) .peek((transactionManager) -> LOGGER.debug("Found tx manager '{0}'", transactionManager.getClass().getName())) .findFirst() .orElseGet(() -> { LOGGER.debug(JcrI18n.warnNoTxManagerFound.text()); return new LocalTransactionManager(); }); }  @Override TransactionManager getTransactionManager(); }
DefaultTransactionManagerLookup implements TransactionManagerLookup { @Override public TransactionManager getTransactionManager() { return Stream.of(getTransactionManagerSuppliers()) .map(Supplier::get) .filter(Optional::isPresent) .map(Optional::get) .peek((transactionManager) -> LOGGER.debug("Found tx manager '{0}'", transactionManager.getClass().getName())) .findFirst() .orElseGet(() -> { LOGGER.debug(JcrI18n.warnNoTxManagerFound.text()); return new LocalTransactionManager(); }); }  @Override TransactionManager getTransactionManager();  }