When having the following entities:
and bootstrapping Hibernate 5.3.2 with `properties.put("hibernate.cache.region.factory_class", "ehcache");` we get the following exception:
This used to work just fine with Hibernate 5.2.
Switching to JCache does not work either.
Consider we have the following properties:
I now get:
JCache (as a spec) does not define support for integrating with transactions - so why/how do you expect JCache to work via transactional access?
For Ehcache, yes previous versions did in fact "support" transactional access - however, I believe this was not really transactional (integrated with JTA). , can you guys confirm this? Regardless, seeing as how it was there before we could certainly add it back (within the normal caveat that neither hibernate-ehcache nor Ehcache 2.0 itself are supported any more).
Specifically, it comes down to whether net.sf.ehcache.Ehcache can be associated with JTA transactions. The PR assumes it can. If not, the PR needs major re-work to leverage the new CacheTransactionContext contract for transactional support
I'm a bit far from these things. Ehcache 3 supports XA.
For Ehcache 2, I don't know.
Both Ehcache 2 and 3 do support full blown XA, including crash recovery with all bells and whistles. For Ehcache 2, you should look for transactional mode "xa_strict" (see http://www.ehcache.org/documentation/2.8/apis/transactions.html) while in version 3 you should add a XAStoreConfiguration to your cache config (see http://www.ehcache.org/documentation/3.0/xa.html).