简体   繁体   中英

Database 'commits' even after hibernate ehcache hit

I am seeing commits to the database after getting a cache hit from ehcache.

When I look in the MYSQL SQL query logs I see this:

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

This is obviously a big performance hit. Any ideas what I have configured wrong?

I solved this eventually. The answer is here in the docs:

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

Using the LazyConnectionDataSourceProxy stopped the commits.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM