If I got it right, to gain flexibility we should instantiate
Because right now, the region factory is a class defined in the Spring
Do you have an code example (I haven't done programmatic instantiation of
Hibernate for a long long time)
On Mon, 18 Jun 2018 at 16:52, Steve Ebersole <steve(a)hibernate.org> wrote:
Or Class (not String) loaded from the proper ClassLoader
On Mon, Jun 18, 2018 at 3:51 PM Steve Ebersole <steve(a)hibernate.org>
> You can pass a RegionFactory instance.
> On Mon, Jun 18, 2018 at 1:48 PM Henri Tremblay <henri.tremblay(a)gmail.com>
>> A change in the latest Spring Boot version is now setting a real class
>> loader when creating a JCache cache manager. Before it used to pass null.
>> Just like Hibernate still does.
>> So right now, we end up with two class managers. One for Hibernate 2nd
>> level cache and one for Spring cache.
>> We made a workaround in JHipster. You can see the full code and
>> It's not super pretty. The Hibernate region factory is instantiated from
>> property using the no-args constructor. So we set the wanted class loader
>> to a static variable and retrieves it in the region factory
>> It works. But it's not pretty.
>> I was looking for a cleaner solution. Probably passing a Contributor to
>> Is there a way to programmatically pass a contributor or a region factory
>> to Hibernate? From Spring Boot.
>> hibernate-dev mailing list