public interface JpaSession
Modifier and Type | Method and Description |
---|---|
<T> CompletionStage<T> |
withTransaction(Function<javax.persistence.EntityManager,T> block)
Execute the given function in a JPA transaction.
|
<T> CompletionStage<T> withTransaction(Function<javax.persistence.EntityManager,T> block)
The JPA EntityManager is provided to the function. This will execute the callback in a thread pool that is specifically designed for use with JDBC calls.
block
- the function to execute