Skip to content

Instantly share code, notes, and snippets.

@harish71
Forked from sophea/TransactionManagerConfig
Created April 12, 2020 15:47
Show Gist options
  • Save harish71/f0a97cd16f9c6d6b7499ae0b0e31a884 to your computer and use it in GitHub Desktop.
Save harish71/f0a97cd16f9c6d6b7499ae0b0e31a884 to your computer and use it in GitHub Desktop.
multi chained Transactions Manager
/**
* @author Mak Sophea
* @date : 1/15/2020
**/
@Configuration
public class TransactionManagerConfig {
@Bean(name = "chainedTransactionManager")
public ChainedTransactionManager transactionManager (
@Qualifier("sqlServerTransactionManager") PlatformTransactionManager sqlTransactionManager,
@Qualifier("oracleTransactionManager") PlatformTransactionManager oracleTransactionManager) {
return new ChainedTransactionManager(sqlTransactionManager, oracleTransactionManager);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment