HHH-12697 - Headings problem in Hibernate Documentation 5.3.1 - Proxool configuration
HHH-12698 - Headings problem in Hibernate Documentation 5.3.1 - Transation Patterns
This commit is contained in:
parent
3dcf69c687
commit
4539be09c2
|
@ -989,7 +989,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*`::
|
||||
|
|
|
@ -157,7 +157,7 @@ Nevertheless, the reasons why we advise you to have all entities belonging to an
|
|||
- from a performance perspective, adding an additional check on a per entity type level slows the bootstrap process.
|
||||
- providing different caching semantics for subclasses would violate the https://en.wikipedia.org/wiki/Liskov_substitution_principle[Liskov substitution principle].
|
||||
|
||||
[[caching-query]]
|
||||
[[caching-entity]]
|
||||
=== Entity cache
|
||||
|
||||
[[caching-entity-mapping-example]]
|
||||
|
@ -363,7 +363,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]
|
||||
|
|
|
@ -1952,7 +1952,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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -78,20 +78,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-isolation>>.
|
||||
|
||||
[[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].
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
-->
|
||||
<!--tag::events-default-listener-mapping-example[]-->
|
||||
<!-- tag::events-default-listener-mapping-example[] -->
|
||||
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm
|
||||
|
@ -24,4 +24,4 @@
|
|||
</persistence-unit-defaults>
|
||||
</persistence-unit-metadata>
|
||||
</entity-mappings>
|
||||
<!--end::events-default-listener-mapping-example[]-->
|
||||
<!-- end::events-default-listener-mapping-example[] -->
|
|
@ -5,7 +5,7 @@
|
|||
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
-->
|
||||
<!--tag::mapping-model-dynamic-example[]-->
|
||||
<!-- tag::mapping-model-dynamic-example[] -->
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||
|
@ -20,4 +20,4 @@
|
|||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
<!--end::mapping-model-dynamic-example[]-->
|
||||
<!-- end::mapping-model-dynamic-example[] -->
|
||||
|
|
Loading…
Reference in New Issue