From 656b2737f90a008dbbeee995cbc6cfd371bad8c5 Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Thu, 11 Oct 2018 08:50:34 +0300 Subject: [PATCH] HHH-13009 - No documentation for "hibernate.javax.cache.cache_manager" --- .../userguide/chapters/caching/Caching.adoc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc index 0d3e5ea7ea..0cbeed7fc0 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc @@ -559,6 +559,30 @@ In order to control which provider to use and specify configuration for the `Cac Only by specifying the second property `hibernate.javax.cache.uri` will you be able to have a `CacheManager` per `SessionFactory`. +===== Using a non-default JCache `CacheManager` + +If you don't want to use the default `CacheManager`, you need to set the `hibernate.javax.cache.cache_manager` configuration property +to one of the following values: + +Object reference:: If the value is an Object instance implementing the `CacheManager` interface, +the provided `CacheManager` instance will be used. +`Class`:: If the value is a Java `Class` object that implements the `CacheManager` interface, +Hibernate will create a new instance for that `Class` and use it instead of the default one. ++ +[NOTE] +==== +The default no-arg constructor is going to be used, so make sure that the `CacheManager` +implementation class provides it. +==== +`String`:: If the value is a Java `String`, Hibernate expects it to be the fully-qualified `Class` name +of the `CacheManager` implementation which will be used to instantiate the non-default `CacheManager`. ++ +[NOTE] +==== +The default no-arg constructor is going to be used, so make sure that the `CacheManager` +implementation class provides it. +==== + [[caching-provider-jcache-missing-cache-strategy]] ==== JCache missing cache strategy