TransactionManager transactionManager = new DefaultTransactionManager(resManager, config);
/* 将事务管理器加入到资源管理器中 */
resManager.setResource(TransactionManager.class.getName(), transactionManager);
/* 返回在fto-jthink.xml中配置的JDBC事务 */
TransactionFactory transactionFactory = transactionManager.getTransactionFactory("SampleTransaction");
JDBCTransaction transaction = (JDBCTransaction)transactionFactory.create();
/* 将此事务处理对象加入到事务管理器中 */
transactionManager.addTransaction(JDBCTransaction.class.getName(), transaction);
resManager.setResource(JDBCTransaction.class.getName(), transaction);
return resManager;