0

从 ehcache 获得缓存命中后,我看到对数据库的提交。

当我查看 MYSQL SQL 查询日志时,我看到:

130730 17:20:23    53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
130730 17:20:24    53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit

这显然是对性能的重大打击。有什么想法我配置错了吗?

4

1 回答 1

0

我最终解决了这个问题。答案在文档中:

http://terracotta.org/documentation/3.7.4/enterprise-ehcache/distributed-hibernate#empty-db-connections

使用 LazyConnectionDataSourceProxy 停止了提交。

于 2013-08-02T11:33:14.457 回答