/** * Get the {@linkplain PlatformTransactionManager transaction manager} * to use for the supplied {@linkplain TestContext test context}. * <p>The default implementation simply delegates to * {@link TestContextTransactionUtils#retrieveTransactionManager}. * @param testContext the test context for which the transaction manager * should be retrieved * @return the transaction manager to use, or {@code null} if not found * @throws BeansException if an error occurs while retrieving an explicitly * named transaction manager * @throws IllegalStateException if more than one TransactionManagementConfigurer * exists in the ApplicationContext * @see #getTransactionManager(TestContext, String) */ protected PlatformTransactionManager getTransactionManager(TestContext testContext) { @SuppressWarnings("deprecation") String tmName = retrieveConfigurationAttributes(testContext).getTransactionManagerName(); return TestContextTransactionUtils.retrieveTransactionManager(testContext, tmName); }
new TransactionConfigurationAttributes(txConfig.transactionManager(), txConfig.defaultRollback())); if (logger.isDebugEnabled()) { logger.debug(String.format("Using TransactionConfigurationAttributes %s for test class [%s].",
return txConfigAttributes.isDefaultRollback();