jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3429949905
##########
grails-core/src/main/groovy/org/grails/transaction/ChainedTransactionManager.java:
##########
@@ -88,7 +89,18 @@ public
ChainedTransactionManager(PlatformTransactionManager... transactionManage
this.synchronizationManager = synchronizationManager;
this.transactionManagers = new ArrayList<>();
- this.transactionManagers.addAll(Arrays.asList(transactionManagers));
+ // A single PlatformTransactionManager instance can be exposed under
more than one bean
Review Comment:
Done in `6ae130adb5` - condensed the six-line comment to two lines that
state the identity-dedup rationale (the same manager can be registered under
several bean names, and committing one instance twice throws "Transaction is
already completed").
##########
grails-test-examples/hyphenated/grails-app/conf/application.yml:
##########
@@ -62,9 +62,13 @@ grails:
hibernate:
cache:
queries: false
- use_second_level_cache: true
+ use_second_level_cache: false
Review Comment:
Yes - the second-level cache being configured is covered on Hibernate 7 by
`SecondLevelCacheSpec`
(`grails-data-hibernate7/core/src/test/.../connections/SecondLevelCacheSpec.groovy`).
It sets `hibernate.cache.use_second_level_cache: true` with the
Hibernate-7-compatible
`org.hibernate.cache.jcache.internal.JCacheRegionFactory`, maps a `@Cache`
entity, and asserts the 2LC region is registered and exercises the
miss-then-hit behaviour (load once = miss, load again = hit, served from the
cache).
This `hyphenated` app sets `use_second_level_cache: false` only because the
value it previously used, `org.hibernate.cache.ehcache.EhCacheRegionFactory`,
is the Hibernate-5 EhCache 2 region factory and does not exist on Hibernate 7.
The 2LC configuration behaviour itself is not lost - it remains covered by
`SecondLevelCacheSpec`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]