From 3274776acc7b14f323a1a9611336190a78238438 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 6 Feb 2024 20:31:46 +0100 Subject: [PATCH] document Transaction.setTimeout() --- .../src/main/asciidoc/introduction/Interacting.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/documentation/src/main/asciidoc/introduction/Interacting.adoc b/documentation/src/main/asciidoc/introduction/Interacting.adoc index 4f64b4e5cc..220219786a 100644 --- a/documentation/src/main/asciidoc/introduction/Interacting.adoc +++ b/documentation/src/main/asciidoc/introduction/Interacting.adoc @@ -207,6 +207,13 @@ In a container environment, the container itself is usually responsible for mana In Java EE or Quarkus, you'll probably indicate the boundaries of the transaction using the `@Transactional` annotation. **** +JPA doesn't have a standard way to set the transaction timeout, but Hibernate does: + +[source,java] +---- +session.getTransaction().setTimeout(30); // 30 seconds +---- + [[persistence-operations]] === Operations on the persistence context