Skip to content

Commit 657e7a2

Browse files
quaffbeikov
authored andcommitted
HHH-15422 Update corresponding documentation
1 parent 7c315fd commit 657e7a2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

documentation/src/main/asciidoc/introduction/Advanced.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ To make use of multi-tenancy, we'll usually need to set at least one of these co
320320
| `hibernate.multi_tenant_connection_provider` | Specifies the `MultiTenantConnectionProvider`
321321
|===
322322

323+
Do not configure those properties if you would like the configured `BeanContainer` provide the implementation.
323324
A longer discussion of multi-tenancy may be found in the {multitenacy-doc}[User Guide].
324325

325326
[[custom-sql]]

documentation/src/main/asciidoc/userguide/chapters/multitenancy/MultiTenancy.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ The `MultiTenantConnectionProvider` to use can be specified in a number of ways:
118118

119119
* Use the `hibernate.multi_tenant_connection_provider` setting.
120120
It could name a `MultiTenantConnectionProvider` instance, a `MultiTenantConnectionProvider` implementation class reference or a `MultiTenantConnectionProvider` implementation class name.
121+
* Provided by the configured `BeanContainer`.
121122
* Passed directly to the `org.hibernate.boot.registry.StandardServiceRegistryBuilder`.
122123
* If none of the above options match, but the settings do specify a `hibernate.connection.datasource` value,
123124
Hibernate will assume it should use the specific `DataSourceBasedMultiTenantConnectionProviderImpl` implementation which works on a number of pretty reasonable assumptions when running inside of an app server and using one `javax.sql.DataSource` per tenant.
@@ -161,7 +162,7 @@ include::{example-dir-multitenancy}/AbstractMultiTenancyTest.java[tags=multitena
161162

162163
`org.hibernate.context.spi.CurrentTenantIdentifierResolver` is a contract for Hibernate to be able to resolve what the application considers the current tenant identifier.
163164
The implementation to use can be either passed directly to `Configuration` via its `setCurrentTenantIdentifierResolver` method,
164-
or be specified via the `hibernate.tenant_identifier_resolver` setting.
165+
or be specified via the `hibernate.tenant_identifier_resolver` setting, or be provided by the configured `BeanContainer`.
165166

166167
There are two situations where `CurrentTenantIdentifierResolver` is used:
167168

0 commit comments

Comments
 (0)