From 1855d23aef4af789c060c13f13547a1aebb3a368 Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Thu, 28 Jun 2018 14:47:51 +0300 Subject: [PATCH] HHH-12697 - Headings problem in Hibernate Documentation 5.3.1 - Proxool configuration HHH-12698 - Headings problem in Hibernate Documentation 5.3.1 - Transation Patterns --- .../asciidoc/userguide/appendices/Configurations.adoc | 2 +- .../main/asciidoc/userguide/chapters/caching/Caching.adoc | 4 ++-- .../asciidoc/userguide/chapters/domain/basic_types.adoc | 2 +- .../asciidoc/userguide/chapters/domain/dynamic_model.adoc | 2 +- .../main/asciidoc/userguide/chapters/domain/entity.adoc | 2 +- .../asciidoc/userguide/chapters/jdbc/Database_Access.adoc | 6 +++--- .../userguide/chapters/multitenancy/MultiTenancy.adoc | 2 +- .../main/asciidoc/userguide/chapters/query/hql/HQL.adoc | 4 ++-- .../userguide/chapters/transactions/Transactions.adoc | 8 ++++---- .../userguide/events/DefaultEntityListener-orm.xml | 4 ++-- .../org/hibernate/userguide/mapping/dynamic/Book.hbm.xml | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc index d7b6ed1225..1eafaedb81 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc @@ -897,7 +897,7 @@ The property name defines the role (e.g. `allowed`) and the entity class name (e `*hibernate.jacc_context_id*`:: A String identifying the policy context whose PolicyConfiguration interface is to be returned. The value passed to this parameter must not be null. -[[configurations-misc]] +[[configurations-classloader]] === ClassLoaders properties `*hibernate.classLoaders*`:: diff --git a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc index 458d0f8a2c..bbb14ed65b 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc @@ -176,7 +176,7 @@ Should Hibernate load the `CreditCardPayment` from the cache as indicated by the Because of all these intricacies, Hibernate only considers the base class `@Cacheable` and `@Cache` definition. ==== -[[caching-query]] +[[caching-entity]] === Entity cache [[caching-entity-mapping-example]] @@ -382,7 +382,7 @@ include::{sourcedir}/SecondLevelCacheTest.java[tags=caching-query-region-store-m ---- ==== -[[caching-query-region-native-example]] +[[caching-query-region-store-mode-native-example]] .Using custom query cache mode with Hibernate native API ==== [source, JAVA, indent=0] diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc index 4f720b9d8d..86197223b7 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc @@ -1891,7 +1891,7 @@ include::{extrasdir}/basic/mapping-filter-join-table-persistence-example.sql[] The collections can be filtered if the associated filter is enabled on the currently running Hibernate `Session`. This way, when fetching the `accounts` collections, Hibernate is going to apply the `@FilterJoinTable` clause filtering criteria to the associated collection entries. -[[mapping-filter-collection-query-example]] +[[mapping-filter-join-table-collection-query-example]] .Traversing collections mapped with `@FilterJoinTable` ==== [source, JAVA, indent=0] diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/dynamic_model.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/dynamic_model.adoc index 9d32efbd7c..20a3e2497d 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/dynamic_model.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/dynamic_model.adoc @@ -44,7 +44,7 @@ include::{sourcedir}/DynamicEntityTest.java[tag=mapping-model-dynamic-setting-ex When you are going to save the following `Book` dynamic entity, Hibernate is going to generate the following SQL statement: -[[mapping-model-dynamic-setting-example]] +[[mapping-model-dynamic-persist-example]] .Persist dynamic entity ==== [source,java] diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc index 8c6810a538..d8aefefacf 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc @@ -244,7 +244,7 @@ include::{sourcedir-mapping}/identifier/NaiveEqualsHashCodeEntityTest.java[tag=e It turns out that this still breaks when adding transient instance of `Book` to a set as we saw in the last example: -[[entity-pojo-naive-equals-hashcode-example]] +[[entity-pojo-naive-equals-hashcode-persist-example]] .Auto-generated identifiers with Sets and naive equals/hashCode ==== [source,java] diff --git a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc index 63c803d51b..e1060c2514 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc @@ -76,20 +76,20 @@ Hibernate also provides support for applications to use http://proxool.sourcefor Transaction isolation of the Connections is managed by the `ConnectionProvider` itself. See <>. [[database-connectionprovider-proxool-existing]] -=== Using existing Proxool pools +==== Using existing Proxool pools Controlled by the `hibernate.proxool.existing_pool` setting. If set to true, this ConnectionProvider will use an already existing Proxool pool by alias as indicated by the `hibernate.proxool.pool_alias` setting. [[database-connectionprovider-proxool-jaxp]] -=== Configuring Proxool via XML +==== Configuring Proxool via XML The `hibernate.proxool.xml` setting names a Proxool configuration XML file to be loaded as a classpath resource and loaded by Proxool's JAXPConfigurator. See http://proxool.sourceforge.net/configure.html[proxool configuration]. `hibernate.proxool.pool_alias` must be set to indicate which pool to use. [[database-connectionprovider-proxool-properties]] -=== Configuring Proxool via Properties +==== Configuring Proxool via Properties The `hibernate.proxool.properties` setting names a Proxool configuration properties file to be loaded as a classpath resource and loaded by Proxool's `PropertyConfigurator`. See http://proxool.sourceforge.net/configure.html[proxool configuration]. diff --git a/documentation/src/main/asciidoc/userguide/chapters/multitenancy/MultiTenancy.adoc b/documentation/src/main/asciidoc/userguide/chapters/multitenancy/MultiTenancy.adoc index 8b05afbf15..69b90ae425 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/multitenancy/MultiTenancy.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/multitenancy/MultiTenancy.adoc @@ -148,7 +148,7 @@ include::{sourcedir}/AbstractMultiTenancyTest.java[tags=multitenacy-multitenacy- ---- ==== -[[multitenacy-hibernate-MultiTenantConnectionProvider]] +[[multitenacy-hibernate-CurrentTenantIdentifierResolver]] ==== CurrentTenantIdentifierResolver `org.hibernate.context.spi.CurrentTenantIdentifierResolver` is a contract for Hibernate to be able to resolve what the application considers the current tenant identifier. diff --git a/documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc b/documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc index 1c46a1c2cb..1b3a9ae1f6 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc @@ -164,7 +164,7 @@ In terms of execution, JPA `Query` offers 2 different methods for retrieving a r * `Query#getResultList()` - executes the select query and returns back the list of results. * `Query#getSingleResult()` - executes the select query and returns a single result. If there were more than one result an exception is thrown. -[[hql-api-list-example]] +[[jpql-api-list-example]] .JPA `getResultList()` result ==== [source, JAVA, indent=0] @@ -173,7 +173,7 @@ include::{sourcedir}/HQLTest.java[tags=jpql-api-list-example] ---- ==== -[[hql-api-unique-result-example]] +[[jpql-api-unique-result-example]] .JPA `getSingleResult()` ==== [source, JAVA, indent=0] diff --git a/documentation/src/main/asciidoc/userguide/chapters/transactions/Transactions.adoc b/documentation/src/main/asciidoc/userguide/chapters/transactions/Transactions.adoc index d64eeea10e..082988573c 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/transactions/Transactions.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/transactions/Transactions.adoc @@ -189,7 +189,7 @@ For backwards compatibility, if this configuration parameter is not set but a `o === Transactional patterns (and anti-patterns) [[session-per-operation]] -=== Session-per-operation anti-pattern +==== Session-per-operation anti-pattern This is an anti-pattern of opening and closing a `Session` for each database call in a single thread. It is also an anti-pattern in terms of database transactions. @@ -208,7 +208,7 @@ It is as if your application called commit after each and every JDBC call. ==== [[session-per-request]] -=== Session-per-request pattern +==== Session-per-request pattern This is the most common transaction pattern. The term request here relates to the concept of a system that reacts to a series of requests from a client/user. @@ -245,7 +245,7 @@ Release the underlying database cursor by calling `ScrollableResults#close()` or ==== [[long-conversations]] -=== Conversations +==== Conversations (application-level transactions) The session-per-request pattern is not the only valid way of designing units of work. Many business processes require a whole series of interactions with the user that are interleaved with database accesses. @@ -291,7 +291,7 @@ Automatic versioning is used to isolate concurrent modifications and the `Sessio Session-per-request-with-detached-objects and session-per-conversation each have advantages and disadvantages. [[session-per-application]] -=== Session-per-application +==== Session-per-application anti-pattern The _session-per-application_ is also considered an anti-pattern. The Hibernate `Session`, like the JPA `EntityManager`, is not a thread-safe object and it is intended to be confined to a single thread at once. diff --git a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml b/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml index 1ca0182f29..8f010c8eec 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml +++ b/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml @@ -6,7 +6,7 @@ ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later. ~ See the lgpl.txt file in the root directory or . --> - + @@ -20,4 +20,4 @@ - +