Java Code Examples for com.atomikos.icatch.jta.UserTransactionManager#setForceShutdown()
The following examples show how to use
com.atomikos.icatch.jta.UserTransactionManager#setForceShutdown() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataSourceConfig.java From mybatis.flying with Apache License 2.0 | 6 votes |
@Bean(name = "springTransactionManager") // 用户数据源的事务管理器 public JtaTransactionManager accountTxManager() { UserTransactionManager atomikosTransactionManager = new UserTransactionManager(); atomikosTransactionManager.setForceShutdown(true); UserTransaction atomikosUserTransaction = new UserTransactionImp(); try { atomikosUserTransaction.setTransactionTimeout(300); } catch (SystemException e) { } JtaTransactionManager springTransactionManager = new org.springframework.transaction.jta.JtaTransactionManager(); springTransactionManager.setTransactionManager(atomikosTransactionManager); springTransactionManager.setUserTransaction(atomikosUserTransaction); springTransactionManager.setAllowCustomIsolationLevels(true); return springTransactionManager; }
Example 2
Source File: FastDepAtomikosTransactionConfigure.java From fastdep with Apache License 2.0 | 5 votes |
/** * atomikosTransactionManager * * @return userTransactionManager */ @Bean(name = "atomikosTransactionManager", initMethod = "init", destroyMethod = "close") public TransactionManager atomikosTransactionManager() { UserTransactionManager userTransactionManager = new UserTransactionManager(); userTransactionManager.setForceShutdown(false); return userTransactionManager; }
Example 3
Source File: SupportConfig.java From jeesupport with MIT License | 5 votes |
/** * atomikos事务管理器,一般情况无需修改 * @return */ @Bean( initMethod = "init", destroyMethod = "close" ) public UserTransactionManager atomikosTM(){ if( CommonConfig.getBoolean( "jees.jdbs.enable" ) != true ) return null; UserTransactionManager utm = new UserTransactionManager(); utm.setForceShutdown( false ); log.debug( "--Spring Bean[atomikosTM]初始化." ); return utm; }
Example 4
Source File: MainConfig.java From spring-boot-jta-atomikos-sample with Apache License 2.0 | 5 votes |
@Bean(name = "atomikosTransactionManager", initMethod = "init", destroyMethod = "close") public TransactionManager atomikosTransactionManager() throws Throwable { UserTransactionManager userTransactionManager = new UserTransactionManager(); userTransactionManager.setForceShutdown(false); AtomikosJtaPlatform.transactionManager = userTransactionManager; return userTransactionManager; }
Example 5
Source File: JpaCoreConfig.java From bearchoke with Apache License 2.0 | 5 votes |
@Bean(initMethod = "init", destroyMethod = "close") public UserTransactionManager userTransactionManager() { UserTransactionManager utm = new UserTransactionManager(); utm.setForceShutdown(true); return utm; }