Sander Knopper (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-14867 (
https://hibernate.atlassian.net/browse/HHH-14867?atlOrigin=eyJpIjoiNTAwOD...
)
Re: Hibernate shouldn't require a connection and call commit() when the database
hasn't been accessed at all (
https://hibernate.atlassian.net/browse/HHH-14867?atlOrigin=eyJpIjoiNTAwOD...
)
I think we've run into the same problem. We're using L2 caching and even though
there is a cache hit a jdbc connection is still acquired. See the following session
metrics for example:
i.StatisticalLoggingSessionEventListener : Session Metrics {
1716707 nanoseconds spent acquiring 1 JDBC connections;
0 nanoseconds spent releasing 0 JDBC connections;
0 nanoseconds spent preparing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
236767 nanoseconds spent performing 1 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0
collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0
collections)
}
Is there a way to postpone acquiring a JDBC connection until a L2C miss occurs?
(
https://hibernate.atlassian.net/browse/HHH-14867#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14867#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100206- sha1:821f494 )