wuchaococo commented on issue #7166: URL: https://github.com/apache/incubator-seata/issues/7166#issuecomment-2664474614
@Override @GlobalTransactional(timeoutMills = 300000, name = "springboot-feign-seata-xa") @Transactional(value = "transactionManager") public void test1() { //这个地方有本地事务管理器,所有写入的数据,可以读取 JdbcTemplate jdbcTemplate = new JdbcTemplate(fd); jdbcTemplate.update("insert into account_tbl(user_id,money) values('" + "XXXX" + "','10000') "); List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from account_tbl"); System.out.println("fd query size =" + maps.size()); //这里没有本地事务,写入的数据,无法读取 JdbcTemplate jdbcTemplate2 = new JdbcTemplate(dataSource); jdbcTemplate2.update("insert into account_tbl(user_id,money) values('" + "XXXX" + "','10000') "); List<Map<String, Object>> mapss = jdbcTemplate2.queryForList("select * from account_tbl"); System.out.println("bus query size =" + mapss.size()); } 1、如果只使用JTA的事务管理器,两个写入操作都可以读取 2、增加的全局事务以后,就会查询查询不到的情况 以上情况如何解决 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org