/* 加入应用程序全局资源容器 */
setResourceContainer(ApplicationContext.class.getName(), ApplicationContext.getApplicationContext());
/* 事务 */
if(getResource(TransactionManager.class.getName())==null){
Configuration config = Configuration.getConfiguration();
/* 设置资源, 初始化事务管理器, 将TransactionManager加入到ResourceManager中 */
TransactionManager transactionManager = new DefaultTransactionManager(this, config);
setResource(TransactionManager.class.getName(), transactionManager);
/* 设置资源,初始化事务工厂 */
Element transactions = config.getConfig().getChild("transactions");
if(transactions!=null){
Iterator transactionsIT = transactions.getChildren().iterator();
while(transactionsIT.hasNext()){
Element transaction = (Element)transactionsIT.next();
/* 创建事务工厂 */