分布式事务JTA之实践:Spring+ATOMIKOS

转自:http://sjsky.iteye.com/blog/1112012

 

DROP TABLE IF EXISTS `tb_account`;
CREATE TABLE `tb_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `deposit` float DEFAULT NULL,
  `user_name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `tb_account` VALUES (1, 22000, 'husband');
INSERT INTO `tb_account` VALUES (2, 0, 'wife');
 
DROP TABLE IF EXISTS `tb_user_info`;
CREATE TABLE `tb_user_info` (
  `user_name` varchar(20) NOT NULL,
  `real_name` varchar(10) DEFAULT NULL,
  `remark1` varchar(50) DEFAULT NULL,
  `remark2` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`user_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `tb_user_info` VALUES ('husband', 'husband', '2011-11-29 13:01:36', '2011-11-29 13:01:36');
INSERT INTO `tb_user_info` VALUES ('wife', 'wife', '2011-11-29 13:01:36', '2011-11-29 13:01:36');
 

你可能感兴趣的:(atomikos)