mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
document Transaction.setTimeout()
This commit is contained in:
parent
ee33347786
commit
c8d13108b5
@ -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.
|
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]]
|
[[persistence-operations]]
|
||||||
=== Operations on the persistence context
|
=== Operations on the persistence context
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user